changeset 1336:33d5c2471c09

[project @ 1995-08-25 01:53:42 by jwe]
author jwe
date Fri, 25 Aug 1995 01:53:42 +0000
parents 955705f55fef
children 52a3f38cbfeb
files scripts/polynomial/poly.m
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/polynomial/poly.m	Thu Aug 24 20:47:36 1995 +0000
+++ b/scripts/polynomial/poly.m	Fri Aug 25 01:53:42 1995 +0000
@@ -45,7 +45,8 @@
     usage ("poly (x), where x is a vector or a square matrix");
   endif
   
-  y = [1, zeros (1, n)];
+  y = zeros (1, n+1);
+  y(1) = 1;
   for j = 1:n;
     y(2:(j+1)) = y(2:(j+1)) - v(j) .* y(1:j);
   endfor