next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: rsort

rsort -- sort a list or matrix in reverse order

Synopsis

Description

Same as sort except that the elements or columns are placed in reverse order.
i1 : rsort {4,2,3,1}

o1 = {4, 3, 2, 1}

o1 : List
The optional parameters are the same as for sort.
i2 : R = QQ[a..d];
i3 : m = matrix{{a*b, c*d, a*d^3, b^3*c, 1_R}}

o3 = | ab cd ad3 b3c 1 |

             1       5
o3 : Matrix R  <--- R
i4 : rsort(m, DegreeOrder=>Ascending)

o4 = | b3c ad3 ab cd 1 |

             1       5
o4 : Matrix R  <--- R

See also

Ways to use rsort :