<< moc_null Matlab/Octave Compatibility toolbox moc_polyfit >>

Matlab/Octave Compatibility toolbox >> Matlab/Octave Compatibility toolbox > moc_poly

moc_poly

poly function from octave

Calling Sequence

y = moc_poly (a)

Description

If ais a square N by N matrix, moc_poly (a) is the row vector of the coefficients of det (z * eye (N,N) - a), the characteristic polynomial of a. As an example we can use this to find the eigenvalues of aas the roots of moc_poly (a).

In real-life examples you should, however, use the spec function for computing eigenvalues.

If x is a vector, poly (x) is a vector of coefficients of the polynomial whose roots are the elements of x. That is, of c is a polynomial, then the elements of d = roots (poly (c))} are contained in c. The vectors c and d are, however, not equal due to sorting and numerical errors.

Examples

roots(moc_poly(eye(3,3)))

Authors


Report an issue
<< moc_null Matlab/Octave Compatibility toolbox moc_polyfit >>