Mu Analysis and Synthesis Toolbox | ![]() ![]() |
Find coefficients and roots of a characteristic polynomial from a CONSTANT or VARYING matrix
Syntax
Description
vpoly
forms an n + 1 element VARYING row vector whose elements form the coefficients of the characteristic polynomial, det(sI - matin
(i
)), if matin
is an
n x n VARYING matrix. The coefficients are ordered in descending powers of s. If the input is a column vector vecin
containing the roots of a polynomial, vpoly(vecin)
returns a VARYING row vector whose elements are the coefficients of the corresponding characteristic polynomial.
vroots
returns as a VARYING column vector vecout
whose elements are the roots of the polynomial at each independent variable, if vecin
is a VARYING row vector containing the coefficients of a polynomial. vpoly
and vroots
are identical to the MATLAB poly
and roots
commands, but also work on VARYING matrices.
Examples
Given a 3 x 3 VARYING matrix, find the characteristic polynomial and its roots. Compare this to finding the eigenvalues of the input matrix via veig
.
see(matin
) 3 rows 3 columns iv = 0.1 1 2 3 4 5 6 7 8 9 iv = 0.4 10 11 12 13 14 15 16 17 18matout
=vpoly
(matin
); see(matout
) 1 row 4 columns iv = 0.1 l.0000e+00 -1.5000e+01 -1.8000e+01 -1.4483e-14 iv = 0.4 l.0000e+00 -4.2000e+01 -1.8000e+01 1.2818e-14 vecout = vroots(matout
); see(vecout) 3 rows 1 column iv = 0.1 1.6117e+01 -1.1168e+00 -8.0463e-16 iv = 0.4 4.2424e+01 -4.2429e-01 7.1212e-16evals
=veig
(matin
); see(evals
) 3 rows 1 column iv = 0.1 1.6117e+01 -1.1168e+00 -8.0463e-16 iv = 0.4 4.2424e+01 -4.2429e-01 7.1212e-16
Algorithm
vpoly
and vroots
call the MATLAB poly
and roots
commands.
See Also
eig
, poly
, roots
, veig
![]() | vplot | vsvd, vrho, vschur | ![]() |