Max Function

Max returns the largest value from the comparison of real or complex numbers


Function

The Max function returns the largest values from the comparison of real or complex numbers. You can compare individual values, lists or tables.

For complex numbers, the absolute value is compared. If the absolute value is equal, the left value is returned as a result.


Syntax

Max (Value, Value)

The result is the larger of the two values.

Max (Array)

The result is the largest value of the array.

Max (Array, Array)

Both arrays must be the same size.

The arrays are compared element by element.

The result is an array of the same size whose individual elements contain the larger value.

Example

Max (4, 7) = 7

Max (2 + 3i, 3 + 2i) = 2 + 3i

Max ( [1, 2, 3; 4, 5, 6; 7, 8, 0] ) = 8

Max ( [ 2, 4, 6, 8], [3, 5, 4, 7]) = 3   5   6   8