Function File: v = nanmean (X)
Function File: v = nanmean (X, dim)

Compute the mean value while ignoring NaN values.

nanmean is identical to the mean function except that NaN values are ignored. If all values are NaN, the mean is returned as NaN.

See also: mean, nanmin, nanmax, nansum, nanmedian.

Package: statistics