Statistics Toolbox    
nanmax

Maximum ignoring NaNs

Syntax

Description

m = nanmax(a) returns the maximum with NaNs treated as missing. For vectors, nanmax(a) is the largest non-NaN element in a. For matrices, nanmax(A) is a row vector containing the maximum non-NaN element from each column.

[m,ndx] = nanmax(a) also returns the indices of the maximum values in vector ndx.

m = nanmax(a,b) returns the larger of a or b, which must match in size.

Example

See Also
nanmin, nanmean, nanmedian, nanstd, nansum


  mvtrnd nanmean