Mercurial > hg > octave-lyh
diff scripts/polynomial/poly.m @ 904:3470f1e25a79
[project @ 1994-11-09 21:22:15 by jwe]
author | jwe |
---|---|
date | Wed, 09 Nov 1994 21:22:15 +0000 |
parents | c5d35bb139b6 |
children | f558749713f1 |
line wrap: on
line diff
--- a/scripts/polynomial/poly.m +++ b/scripts/polynomial/poly.m @@ -1,13 +1,13 @@ function y = poly (x) - # - # If A is a square n-by-n matrix, poly (A) is the row vector of - # the coefficients of det (z * eye(n) - A), the characteristic - # polynomial of A. - # If x is a vector, poly (x) is a vector of coefficients of the - # polynomial whose roots are the elements of x. - # Written by KH (Kurt.Hornik@neuro.tuwien.ac.at) on Dec 24, 1993 - # Copyright Dept of Probability Theory and Statistics TU Wien +# If A is a square n-by-n matrix, poly (A) is the row vector of +# the coefficients of det (z * eye(n) - A), the characteristic +# polynomial of A. +# If x is a vector, poly (x) is a vector of coefficients of the +# polynomial whose roots are the elements of x. + +# Written by KH (Kurt.Hornik@neuro.tuwien.ac.at) on Dec 24, 1993 +# Copyright Dept of Probability Theory and Statistics TU Wien m = min (size (x)); n = max (size (x)); @@ -18,7 +18,7 @@ elseif (m == n) v = eig (x); else - error ("usage: poly(x), where x is a vector or a square matrix"); + usage ("poly(x), where x is a vector or a square matrix"); endif y = [1, zeros (1, n)];