changeset 1178:bceff7ccdb79

[project @ 1995-03-23 21:42:24 by jwe]
author jwe
date Thu, 23 Mar 1995 21:42:24 +0000
parents da83c9182359
children f070efd56c3d
files scripts/polynomial/polyreduce.m
diffstat 1 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/polynomial/polyreduce.m	Wed Mar 22 14:35:18 1995 +0000
+++ b/scripts/polynomial/polyreduce.m	Thu Mar 23 21:42:24 1995 +0000
@@ -30,18 +30,22 @@
 
   index = find (p == 0);
 
-  index = find (index == 1:length(index));
+  if (length (index) != 0)
 
-  if (length (index) == 0)
-    return;
-  endif
+    index = find (index == 1:length(index));
+
+    if (length (index) != 0)
 
-  if(length(p)>1)
-    p = p (index (length (index))+1:length(p));
-  endif
+      if (length (p) > 1)
+	p = p (index (length (index))+1:length (p));
+      endif
 
-  if (length (p) == 0)
-    p = 0;
+      if (length (p) == 0)
+	p = 0;
+      endif
+
+    endif
+
   endif
 
 endfunction