y = nanmax(X)
[y, idx] = nanmax(X)
y = nanmax(X, Y)
[y, idx] = nanmax(X, [], dim)
nanmax returns the maximum after removing NaN values; a slice made only of NaN yields NaN.
nanmax(X, Y) returns the element-wise maximum of X and Y, ignoring NaN.
The optional second output idx holds the indices of the maxima. It is equivalent to max(X, ..., 'omitnan').
[y, idx] = nanmax([1 NaN 5 NaN 3])
| Version | Description |
|---|---|
| 2.0.0 | initial version |