Function Max(x1, x2, ...)

Max

Max(
    x1,      ! (input) numerical, string or element expression
    x2,      ! (input) numerical, string or element expression
    ...
    )

Arguments

x1,x2,…

Multiple numerical, string or element expressions.

Return Value

The function Max returns the largest number, the string highest in the lexicographical ordering, or the element value with the highest ordinal value, among \(x1,x2,\dots\)

Note

The function Max can be used in constraints of nonlinear mathematical programs. However, nonlinear solvers may experience convergence problems if the first order derivatives of two arguments between which the Max function switches are discontinous.

See also

The function Min. Arithmetic functions are discussed in full detail in Arithmetic Functions of the Language Reference.