Computes the companion matrix of a real or complex vector.
vector representing a polynomial
Computes the companion matrix corresponding to the vector
-p[2:length(p)]/p as first row.
The eigenvalues of this matrix are the roots of the polynomial.
A square matrix of
length(p)-1 rows and columns
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.