Mercurial > hg > octave-nkf
diff scripts/polynomial/polyderiv.m @ 1596:b26b206a8994
[project @ 1995-11-01 00:47:21 by jwe]
author | jwe |
---|---|
date | Wed, 01 Nov 1995 00:47:21 +0000 |
parents | 611d403c7f3d |
children | 5d29638dd524 |
line wrap: on
line diff
--- a/scripts/polynomial/polyderiv.m +++ b/scripts/polynomial/polyderiv.m @@ -16,7 +16,7 @@ # along with Octave; see the file COPYING. If not, write to the Free # Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -function p = polyderiv (p) +function q = polyderiv (p) # usage: polyderiv (p) # @@ -38,13 +38,13 @@ lp = length (p); if (lp == 1) - p = 0; + q = 0; return; elseif (lp == 0) - p = []; + q = []; return; end - p = p (1:(lp-1)) .* [(lp-1):-1:1]; + q = p (1:(lp-1)) .* [(lp-1):-1:1]; endfunction