SORT

Returns a matrix sorted in the direction you specified.

Format

SORT (M, D)

Arguments

 
M
A matrix.
D
Direction in which the matrix is sorted:
a = ascending
d = descending

Example

The following example illustrates the use of the SORT function:
 
Function
SORT({3,2,1},"a")
Result
{1,2,3}