Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - 日本語 - Русский

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
However, this page did not exist in the previous stable version.

Ajuda do Scilab >> Estatística > Data with Missing Values > nancumsum


This function returns the cumulative sum of the values of a matrix


s = nancumsum(x,orient)



x is a numerical vector or matrix.


is an optional parameter. The possible values are '*', 1, 2, 'r' or 'c'.


numerical scalar or vector. It contains the cumulative sum of the values of x, ignoring the NAN's.


This function returns in scalar or vector s the cumulative sum of the values (ignoring the NANs) of a vector or matrix (real or complex) x.

This function for a vector or a matrix x, s=nancumsum(x) (or, equivalently s=nancumsum(x,'*')) returns in scalar s the cumulative sum (ignoring the NANs) of all the entries of x taken columnwise.

s=nancumsum(x,'r') (or, equivalently, s=nancumsum(x,1)) returns in s the cumulative sum (ignoring the NANs) of the rows of x: s(:,i)=nancumsum(x(:,i))

s=nancumsum(x,'c') (or, equivalently, s=nancumsum(x,2)) returns in s the cumulative sum (ignoring NANs) of the columns of x: s(i,:)=nancumsum(x(i,:))


a=[1 2 %nan;%nan 5 6]

See also

  • nansum — Sum of values ignoring NAN's
  • cumsum — soma cumulativa
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Feb 12 19:58:37 CET 2018