max
- :
m =max(x)¶ - :
m =max(x, [], dim)¶ - :
m =max(x, [], vecdim)¶ - :
m =max(x, [], "all")¶ - :
[m, i] =max(…)¶ - :
m =max(x, y)¶ - :
… =max(…, "omitnan")¶ - :
… =max(…, "includenan")¶ Return the largest elements.
With one array argument the maximum is taken along the first dimension that is not of length one. The dimension (or a vector of dimensions, or
"all") can be chosen with the third argument, after an empty second argument. The second output holds the position of the first occurrence of the maximum in each slice.With two array arguments the larger of each pair of elements is returned; the arguments may differ in size when one can be expanded to the other.
NaN values are skipped unless
"includenan"is given, in which case any NaN makes the result NaN. Complex values are compared by magnitude and then by phase angle.