MATLAB Function Reference Previous page   Next Page
compan

Companion matrix

Syntax

Description

A = compan(u) returns the corresponding companion matrix whose first row is -u(2:n)/u(1), where u is a vector of polynomial coefficients. The eigenvalues of compan(u) are the roots of the polynomial.

Examples

The polynomial

has a companion matrix given by

The eigenvalues are the polynomial roots:

This is also roots(u).

See Also

eig, poly, polyval, roots


Previous page  commandwindow compass Next page

© 1994-2005 The MathWorks, Inc.