Function File: [v, idx] = nanmax (X)
Function File: [v, idx] = nanmax (X, Y)

Find the maximal element while ignoring NaN values.

nanmax is identical to the max function except that NaN values are ignored. If all values in a column are NaN, the maximum is returned as NaN rather than [].

See also: max, nansum, nanmin, nanmean, nanmedian.

Package: statistics