Previous Up Next

5.43.24  Sort a list by decreasing order: SortD

SortD takes a list as argument.
SortD returns this list sorted by decreasing order.
Input:

SortD([3,4,2])

Output:

[2,3,4]

SortD may have a matrix as argument and in this case, SortD modifies the order of columns by sorting the first matrix row by decreasing order.
Input:

SortD([[3,4,2],[6,4,5]])

Output:

[[4,3,2],[4,6,5]]

Previous Up Next