max(A) is a reduction operator. If A is a matrix, it returns a row vector containing the maximum values from each row of A. If A is a row vector or scalar, it returns a scalar containing the maximum value in A. max(A,B) returns an array containing the element-by-element maximums. If both arguments are vectors or matrices, they must be the same size.