Statistics Toolbox    
nanmedian

Median ignoring NaNs

Syntax

Description

y = nanmedian(X) is the median computed by treating NaNs as missing values.

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

Example

See Also
nanmin, nanmax, nanmean, nanstd, nansum


  nanmean nanmin