changeset 5686:e7790bb14cfc

[project @ 2006-03-16 20:01:05 by jwe]
author jwe
date Thu, 16 Mar 2006 20:01:06 +0000
parents 40b08b29dd53
children a2902024bc4e
files scripts/ChangeLog scripts/control/base/bode_bounds.m
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Mar 16 19:47:14 2006 +0000
+++ b/scripts/ChangeLog	Thu Mar 16 20:01:06 2006 +0000
@@ -1,3 +1,8 @@
+2006-03-16  John W. Eaton  <jwe@octave.org>
+
+	* control/base/bode_bounds.m: Check for iip and iiz empty instead
+	of looking at sum of max dimensions.
+
 2006-03-16  David Bateman  <dbateman@free.fr>
 
 	* testfun/test.m: Clear last warning before warning test to avoid
--- a/scripts/control/base/bode_bounds.m	Thu Mar 16 19:47:14 2006 +0000
+++ b/scripts/control/base/bode_bounds.m	Thu Mar 16 20:01:06 2006 +0000
@@ -63,14 +63,14 @@
     if(!isempty(pol)) cpol = pol(iip);
     else              cpol = [];                endif
   endif
-
-  if(max(size(iip)) + max(size(iiz)) )
-    wmin = floor(log10(min(abs([cpol,czer]))));
-    wmax = ceil(log10(max(abs([cpol,czer]))));
-  else
+  
+  if (isempty (iip) && isempty (iiz))
     ## no poles/zeros away from omega = 0; pick defaults
     wmin = -1;
     wmax = 3;
+  else
+    wmin = floor(log10(min(abs([cpol,czer]))));
+    wmax = ceil(log10(max(abs([cpol,czer]))));
   endif
 
   ## expand to show the entirety of the "interesting" portion of the plot