Skip to content

roots

polynomial · scripts/polynomial/roots.m

R = roots (C)  --  roots of a polynomial.

C holds the coefficients, highest power first.  The roots are returned as
a column vector: the non-zero roots are the eigenvalues of the companion
matrix of the trimmed polynomial, followed by one zero root for every
trailing zero coefficient.