Polynomial with specified roots

`p = poly(A)`

p = poly(r)

`p = poly(A)`

where `A`

is
an `n`

-by-`n`

matrix returns an `n+1`

element
row vector whose elements are the coefficients of the characteristic
polynomial, det(*λI* – *A*).
The coefficients are ordered in descending powers: if a vector `c`

has `n+1`

components,
the polynomial it represents is *c*_{1}*λ ^{n}* +

`p = poly(r)`

where `r`

is
a vector returns a row vector whose elements are the coefficients
of the polynomial whose roots are the elements of `r`

.

MATLAB^{®} displays polynomials as row vectors containing the
coefficients ordered by descending powers. The characteristic equation
of the matrix

A = 1 2 3 4 5 6 7 8 0

is returned in a row vector by `poly`

:

p = poly(A) p = 1 -6 -72 -27

The roots of this polynomial (eigenvalues of matrix `A`

)
are returned in a column vector by `roots`

:

r = roots(p) r = 12.1229 -5.7345 -0.3884

Was this topic helpful?