Symbolic Math Toolbox | Search  Help Desk | |
poly | Examples | See Also |
Characteristic polynomial of a matrix.
p = poly(A) p = poly(A, v)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.
Note that if A
is numeric, poly(sym(A))
approximately equals poly2sym(poly(A))
. The approximation is due to roundoff error.
The statements
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
poly2sym
,jordan
,eig
,solve