Number of terms of a polynomial
This functionality does not run in MATLAB.
nterms(p) returns the number of terms of
If the first argument
f is not element of
a polynomial domain, then
nterms converts the expression
to a polynomial via
If a list of indeterminates is specified, then the polynomial
(f, vars) is
A zero polynomial has no terms: the return value is 0.
We give some self explaining examples:
nterms(x^2*y^2 + x^2 + y + 2, [x, y])
nterms(poly(x^2*y^2 + x^2 + y + 2))
The following polynomial expression may be regarded as a polynomial in different ways:
f := x^2*y^2 + x^2 + y + 2: nterms(f, [x]), nterms(f, [y]), nterms(f, [x, y]), nterms(f, [z])
FAIL is returned if the input cannot
be converted to a polynomial.