sort - Maple Help

MTM

 sort
 numerical and lexicographical sort

 Calling Sequence sort(V) sort(p)

Parameters

 V - vector p - polynomial expression

Description

 • For vector V, the function sort(V) will return a vector W with the same dimensions as V.  The elements of W are the elements of V sorted in numerical and lexicographical order.
 • For polynomial p, the function sort(p) will return a polynomial q which is equal to p, but with the terms ordered by descending degree.

Examples

 > $\mathrm{with}\left(\mathrm{MTM}\right):$
 > $v≔\mathrm{Array}\left(\left[g,24,3,e,\mathrm{12a}\right]\right)$
 ${v}{≔}\left[\begin{array}{ccccc}{g}& {24}& {3}& {e}& {\mathrm{12a}}\end{array}\right]$ (1)
 > $\mathrm{sort}\left(v\right)$
 $\left[\begin{array}{ccccc}{3}& {24}& {\mathrm{12a}}& {e}& {g}\end{array}\right]$ (2)
 > $u≔\mathrm{sort}\left(4x+{x}^{4}-{x}^{2}\right)$
 ${u}{≔}{{x}}^{{4}}{-}{{x}}^{{2}}{+}{4}{}{x}$ (3)