Sorting monomials with respect to a term ordering
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
polylib::sortMonomials(f, ord) returns a
list of all monomials constituting the polynomial
sorted in descending order with respect to
A monomial ordering may be: one of the identifiers
or an object of type
Dom::MonomOrdering or convertible
to that type; or any object returning a number when called as
two degree vectors
A degree vector is a list of integers, as returned by
If no order is given, the lexikographical order is used.
If no list of variables is given, all indeterminates of
Given two degree vectors,
m1 is considered
to be greater than
m2 if and only if
The monomials of the polynomial below are compared using a monomial
polylib::sortMonomials(poly(x^2+x*y^3+2, [x,y]), DegRevLex(2))
Polynomial or polynomial expression
Nonempty list of identifiers
List of polynomials or expressions of the same type as