changeset 944:2e954ce5263f

[project @ 1994-11-21 19:18:33 by jwe]
author jwe
date Mon, 21 Nov 1994 19:18:33 +0000
parents 4fc1ae8c24dc
children a1b0080599e5
files scripts/polynomial/roots.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/polynomial/roots.m
+++ b/scripts/polynomial/roots.m
@@ -7,7 +7,10 @@
 # Copyright Dept of Probability Theory and Statistics TU Wien
   
   [nr, nc] = size(v);
-  if !((nr == 1 && nc > 1) || (nc == 1 && nr > 1))
+  if (nr <= 1 && nc <= 1)
+    r = [];
+    return;
+  elseif (! ((nr == 1 && nc > 1) || (nc == 1 && nr > 1)))
     usage ("roots (v), where v is a nonzero vector");
   endif