Contents | Previous | Next | Subchapters |
Syntax |
z = max( x) |
[ z, index] = max( x) | |
w = max( x, y) | |
z
The return value z has the same type as x.
If x is a vector,
z is a scalar equal to
the maximum element of x.
Otherwise,
it is a row vector with the same column dimension as x
and with j-th element
equal to the maximum element in the j-th column of x.
index
The return value index is an integer vector with the
same dimension as z.
If x is a vector,
index is the index in x of its maximum element.
Otherwise,
the j-th element of index is the row index
of the maximum element in the j-th column of x
w
is the
element-by-element
maximum of the elements of x and y.
max( [1, 2 , 3] )
O-Matrix will respond
3