max
Largest element in array of fi objects
Description
returns the largest
elements along different dimensions of M = max(A)fi array
A.
If
Ais a vector,max(A)returns the largest element inA.If
Ais a matrix,max(A)treats the columns ofAas vectors, returning a row vector containing the maximum element from each column.If
Ais a multidimensional array,maxoperates 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