MAX

Syntax: | `vout = MAX( v1{,v2,...} )`

The `MAX` function accepts from one to a maximum of twenty arguments. If only one argument is supplied, the maximum element of that argument is returned. If two or more arguments are supplied, the arguments are compared element by element, and the maximum values are returned. The arguments can be scalars, vectors, matrices or tensors, but cannot be mixed, and all arrays must be the same size. Scalar arguments result in a scalar. Vector arguments result in a vector with the same length as the arguments, and matrix (tensor) arguments result in a matrix (tensor) with the same dimensions as the arguments.

arguments | result | definition
one vector | scalar | `MAX(x)` | = maximum(`x[1],x[2],...,x[#]`)
one matrix | scalar | `MAX(m)` | = maximum(`m[1,1],...,m[#,#]`)
scalars | scalar | `MAX(a,b,...)` | = maximum(`a,b,...`)
vector | vector | `MAX(x,y,...)[j]` | = maximum(`x[j],y[j],...`)
matrix | matrix | `MAX(m1,m2,...)[i,j]` | = maximum(`m1[i,j],m2[i,j],...`)