Skip to content

compan

polynomial · scripts/polynomial/compan.m

A = compan (C)  --  companion matrix of the polynomial with coefficient
vector C (highest power first).

For C of length N the result is (N-1)-by-(N-1); its eigenvalues are the
roots of the polynomial.