Ground term (constant coefficient) of a polynomial
MuPAD® notebooks are not recommended. 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.
ground(p) returns the constant coefficient p(0,
0, …) of the polynomial p.
The first argument can either be a polynomial expression, or
a polynomial generated by
or an element of some polynomial domain overloading
If the first argument
f is not element of
a polynomial domain, then
ground converts the expression
to a polynomial via
poly(f). If a list of indeterminates
is specified, then the polynomial
poly(f, vars) is
The constant coefficient is returned as an arithmetical expression.
be converted to a polynomial in the specified indeterminates. Cf. Example 3.
We demonstrate how the indeterminates influence the result:
f := 2*x^2 + 3*y + 1: ground(f), ground(f, [x]), ground(f, [y]), ground(poly(f)), ground(poly(f, [x])), ground(poly(f, [y]))
The result is the evaluation at the origin:
subs(f, x = 0, y = 0), subs(f, x = 0), subs(f, y = 0)
Note the difference between
g := 2*x^2 + 3*y: ground(g), ground(g, [x]); tcoeff(g), tcoeff(g, [x]);
delete f, g:
The result of
ground is not fully evaluated:
p := poly(27*x^2 + a, [x]): a := 5: ground(p), eval(ground(p))
delete p, a:
The following expression is syntactically not a polynomial expression,
f := (x^2 - 1)/(x - 1): ground(f)
After cancellation via
compute the constant coefficient: