Create a companion matrix.
Create the companion matrix associated with the polynomial whose coefficients are given in a.
Parameters : | a : array-like, 1D
|
---|---|
Returns : | c : ndarray
|
Notes
New in version 0.8.0.
Examples
>>> companion([1, -10, 31, -30])
array([[ 10., -31., 30.],
[ 1., 0., 0.],
[ 0., 1., 0.]])