Main Content

Sort elements of real-valued `fi`

object in ascending or descending
order

sorts the
elements of the real-valued `B`

= sort(`A`

)`fi`

object `A`

in ascending order.

If

`A`

is a vector, then`sort(A)`

sorts the vector elements.If

`A`

is a matrix, then`sort(A)`

treats the columns of`A`

as vectors and sorts each column.If

`A`

is a multidimensional array, then`sort(A)`

operates along the first array dimension whose size does not equal`1`

, treating the elements as vectors.