max
Largest element in array of fi
objects
Description
returns the largest
elements along different dimensions of M
= max(A
)fi
array
A
.
If
A
is a vector,max(A)
returns the largest element inA
.If
A
is a matrix,max(A)
treats the columns ofA
as vectors, returning a row vector containing the maximum element from each column.If
A
is a multidimensional array,max
operates along the first nonsingleton dimension and returns an array of maximum values.
Examples
Input Arguments
Output Arguments
Algorithms
When A
or B
is complex, the max
function returns the elements with the largest magnitude. If two magnitudes are equal,
then max
returns the first value. This behavior differs from how the
built-in max
function resolves ties between
complex numbers.
Extended Capabilities
Version History
Introduced before R2006a