Statistics Toolbox    
nanmean

Mean ignoring NaNs

Syntax

Description

y = nanmean(X) is the average computed by treating NaNs as missing values.

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

Example

See Also
nanmin, nanmax, nanmedian, nanstd, nansum


  nanmax nanmedian