Mercurial > hg > octave-nkf
diff scripts/polynomial/polyvalm.m @ 904:3470f1e25a79
[project @ 1994-11-09 21:22:15 by jwe]
author | jwe |
---|---|
date | Wed, 09 Nov 1994 21:22:15 +0000 |
parents | e79ff1f4df3c |
children | f558749713f1 |
line wrap: on
line diff
--- a/scripts/polynomial/polyvalm.m +++ b/scripts/polynomial/polyvalm.m @@ -1,20 +1,21 @@ function y = polyvalm(c,x) -#Evaluate a polynomial in the matrix sense. + +# Evaluate a polynomial in the matrix sense. # -#In octave, a polynomial is represented by it's coefficients (arranged -#in descending order). For example a vector c of length n+1 corresponds -#to the following nth order polynomial -# -# p(x) = c(1) x^n + ... + c(n) x + c(n+1). +# In octave, a polynomial is represented by it's coefficients (arranged +# in descending order). For example a vector c of length n+1 corresponds +# to the following nth order polynomial # -#polyvalm(c,X) will evaluate the polynomial in the matrix sense, i.e. matrix -#multiplication is used instead of element by element multiplication as is -#used in polyval. +# p(x) = c(1) x^n + ... + c(n) x + c(n+1). # -#X must be a square matrix. +# polyvalm(c,X) will evaluate the polynomial in the matrix sense, i.e. matrix +# multiplication is used instead of element by element multiplication as is +# used in polyval. # -#SEE ALSO: polyval, poly, roots, conv, deconv, residue, filter, -# polyderiv, polyinteg +# X must be a square matrix. +# +# SEE ALSO: polyval, poly, roots, conv, deconv, residue, filter, +# polyderiv, polyinteg # Author: # Tony Richardson @@ -22,7 +23,7 @@ # June 1994 if(nargin != 2) - error("usage: polyvalm(c,x)"); + usage ("polyvalm(c,x)"); endif if(is_matrix(c))