nanmin
Minimum, ignoring NaN values.
📝Syntax
y = nanmin(X)
[y, idx] = nanmin(X)
y = nanmin(X, Y)
[y, idx] = nanmin(X, [], dim)
📄Description

nanmin returns the minimum after removing NaN values; a slice made only of NaN yields NaN.

nanmin(X, Y) returns the element-wise minimum of X and Y, ignoring NaN.

The optional second output idx holds the indices of the minima. It is equivalent to min(X, ..., 'omitnan').

💡Examples
[y, idx] = nanmin([4 NaN 1 NaN 3])
🔗See Also
minnanmaxnansum
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub