Largest element in array of `fi`

objects

`x = max(a)`

`x= max(a,[],dim)`

```
[x,y] =
max(___)
```

`m = max(a,b)`

returns
the largest elements along different dimensions of `x`

= max(`a`

)`fi`

array `a`

.

If `a`

is a vector, `max(a)`

returns
the largest element in `a`

.

If `a`

is a matrix, `max(a)`

treats
the columns of `a`

as vectors, returning a row vector
containing the maximum element from each column.

If `a`

is a multidimensional array, `max`

operates
along the first nonsingleton dimension and returns an array of maximum
values.

When `a`

or `b`

is complex,
the `max`

function returns the elements with the
largest magnitude. If two magnitudes are equal, then `max`

returns
the first value. This behavior differs from how the builtin `max`

function resolves ties between complex
numbers.

Was this topic helpful?