Mercurial > hg > octave-lyh
view scripts/polynomial/polyinteg.m @ 561:e79ff1f4df3c
[project @ 1994-07-25 22:32:08 by jwe]
Initial revision
author | jwe |
---|---|
date | Mon, 25 Jul 1994 22:32:08 +0000 |
parents | 4e826edfbc56 |
children | 3470f1e25a79 |
line wrap: on
line source
function p = polyinteg(p) #polyinteg(c) #Returns the coefficients of the integral the polynomial whose coefficients #are represented by the vector c. # #The constant of integration is zero. # #SEE ALSO: poly, polyderiv, polyreduce, roots, conv, deconv, residue, # filter, polyval, polyvalm # Author: # Tony Richardson # amr@mpl.ucsd.edu # June 1994 if(nargin != 1) error("usage: polyinteg(vector)"); endif if(is_matrix(p)) error("argument must be a vector"); endif lp = length(p); if(lp == 0) p = []; return; end if(rows(p) > 1) # Convert to column vector p = p.'; endif p = [ p 0 ] ./ [lp:-1:1 1]; endfunction