MATLAB Functions Help Desk

compan

Purpose

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         Eigenvalues and eigenvectors

poly        Polynomial with specified roots

polyval     Polynomial evaluation

roots       Polynomial roots



[ Previous | Help Desk | Next ]