max
Maximum elements of symbolic input
Syntax
Description
returns the
maximum elements of a symbolic input.M = max(A)
If
Ais a vector, thenmax(A)returns the maximum ofA.If
Ais a matrix, thenmax(A)is a row vector containing the maximum value of each column ofA.
For an input A that contains a symbolic expression, the
symbolic max function returns an unevaluated expression that excludes
elements in A that do not represent maximum values. The output might
have another argument that represents the condition for the symbolic variable. For
example, syms x; max([1 x]) returns the output max([1, x], [],
2, 'omitnan', ~in(x, 'real')) in the Command Window because
x is complex.

![max(A,[],1) column-wise operation](max_dim_1.png)
![max(A,[],2) row-wise operation](max_dim_2.png)