M = min(A)
[M, I] = min(A)
Ais a scalar,
Mis equal to
Ais a vector,
Mis the smallest element of
Ais a matrix or a multidimensional array, an element of
Mis equal to the smallest element of the corresponding vector of
Aalong its first non-singleton dimension.
Iis the position of that smallest element in the direction of the non-singleton dimension.
M = min(A, [ ], k)
[M, I] = min(A, [ ], k)
- This is the same as the previous cases, except that each element of
Mcorresponds to a vector of
Bshould have same sizes.
- It performs elementwise comparison of
B, and returns the smaller element.
- If one of the arguments is scalar, this function compares the scalar with each element of the other argument.
When comparing two numbers by
min, if one of them is
NaN, the other non-
NaN number is returned. If both are
NaN, it returns