Contents Previous Next Subchapters Current Chapters-> pol2asc polval polyval polyvalm poladd polmul polcomp polder zero2pol roots poly pol2zero polcheb polyreduce mlmode_conv deconv residue compan monomial Parent Chapters-> Omatrix6 polynomial compan Search Tools-> contents reference index search

Compute the companion matrix corresponding to polynomial
 Syntax `compan(`c`)` See Also

Description
Returns the companion matrix corresponding to the descending polynomial represented by the vector c. The corresponding companion matrix is given by ```          _                                                        _         |  -c(2)/c(1)   -c(3)/c(1)  ...  -c(n)/c(1)  -c(n+1)/c(1)  |         |       1            0      ...       0             0      |         |       0            1      ...       0             0      |     A = |       .            .   .            .             .      |         |       .            .       .        .             .      |         |       .            .           .    .             .      |         |_      0            0      ...       1             0     _| ```The eigenvalues of the companion matrix are equal to the roots of the polynomial.

Example
If you enter ```      c = [ 1, 2, 3, 4]      compan(c) ``` O-Matrix will reply ```      {      [ -2 , -3 , -4 ]      [ 1 , 0 , 0 ]      [ 0 , 1 , 0 ]      } ```