Symbolic Math Toolbox | ![]() ![]() |
Syntax
p = poly(A) p = poly(A, v)
Description
If A
is a numeric array, poly(A)
returns the coefficients of the characteristic polynomial of A
. If A
is symbolic, poly(A)
returns the characteristic polynomial of A
in terms of the default variable x
. The variable v
can be specified in the second input argument.
A
is numeric, poly(sym(A))
approximately equals poly2sym(poly(A))
. The approximation is due to roundoff error.
A = gallery(3) p = poly(A) q = poly(sym(A)) s = poly(sym(A),z)return
A = -149 -50 -154 537 180 546 -27 -9 -25 p = 1.0000 -6.0000 11.0000 -6.0000 q= x^3-6*x^2+11*x-6 s = z^3-6*z^2+11*z-6
See Also
poly2sym
, jordan
, eig
, solve
![]() | numden | poly2sym | ![]() |