Statistics Toolbox    
nansum

Sum ignoring NaNs

Syntax

Description

y = nansum(X) is the sum computed by treating NaNs as missing values.

For vectors, nansum(x) is the sum of the non-NaN elements of x. For matrices, nansum(X) is a row vector containing the sum of the non-NaN elements in each column of X.

Example

See Also
nanmax, nanmin, nanmean, nanmedian, nanstd


  nanstd nbincdf