GNU Octave Manual Version 3by John W. Eaton, David Bateman, Søren Hauberg Paperback (6"x9"), 568 pages ISBN 095461206X RRP £24.95 ($39.95) |

## 26.6 Miscellaneous Functions

__Function File:__**poly***(*`a`)- If
`a`is a square N-by-N matrix,`poly (`

is the row vector of the coefficients of`a`)`det (z * eye (N) - a)`

, the characteristic polynomial of`a`. As an example we can use this to find the eigenvalues of`a`as the roots of`poly (`

.`a`)roots(poly(eye(3))) => 1.00000 + 0.00000i => 1.00000 - 0.00000i => 1.00000 + 0.00000i

In real-life examples you should, however, use the

`eig`

function for computing eigenvalues.If

`x`is a vector,`poly (`

is a vector of coefficients of the polynomial whose roots are the elements of`x`)`x`. That is, of`c`is a polynomial, then the elements of

are contained in`d`= roots (poly (`c`))`c`. The vectors`c`and`d`are, however, not equal due to sorting and numerical errors.See also eig, roots

__Function File:__**polyout***(*`c`,`x`)- Write formatted polynomial
c(x) = c(1) * x^n + ... + c(n) x + c(n+1)

and return it as a string or write it to the screen (if

`nargout`is zero).`x`defaults to the string`"s"`

.See also polyval, polyvalm, poly, roots, conv, deconv, residue, filter, polyderiv, and polyinteg

__Function File:__**polyreduce***(*`c`)- Reduces a polynomial coefficient vector to a minimum number of terms by
stripping off any leading zeros.
See also poly, roots, conv, deconv, residue, filter, polyval, polyvalm, polyderiv, polyinteg

ISBN 095461206X | GNU Octave Manual Version 3 | See the print edition |