Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

compan

Companion matrix

Syntax

A = compan(u)

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

collapse all

Compute the companion matrix corresponding to the polynomial $(x-1)(x-2)(x+3) = x^3-7x+6$.

u = [1 0 -7 6];
A = compan(u)
A =

     0     7    -6
     1     0     0
     0     1     0

The eigenvalues of A are the polynomial roots.

eig(A)
ans =

   -3.0000
    2.0000
    1.0000

See Also

| | |

Introduced before R2006a

Was this topic helpful?