changeset 7137:38fe664f0ef1

[project @ 2007-11-08 20:26:32 by jwe]
author jwe
date Thu, 08 Nov 2007 20:26:32 +0000
parents 59dcf01bb3e3
children f70121606be5
files scripts/control/base/bode_bounds.m scripts/control/base/lsim.m scripts/control/hinf/hinf_ctr.m scripts/control/hinf/hinfnorm.m scripts/control/obsolete/packsys.m scripts/control/system/ss.m scripts/control/system/sysappend.m scripts/control/system/sysconnect.m scripts/control/system/sysprune.m scripts/control/system/tf2ss.m
diffstat 10 files changed, 14 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/control/base/bode_bounds.m
+++ b/scripts/control/base/bode_bounds.m
@@ -68,8 +68,8 @@
     endif
   else
     ## continuous
-    iip = find (abs(pol) > norm(pol)*eps));
-    iiz = find (abs(zer) > norm(zer)*eps));
+    iip = find (abs(pol) > norm(pol)*eps);
+    iiz = find (abs(zer) > norm(zer)*eps);
 
     if (! isempty (zer))
       czer = zer(iiz);
--- a/scripts/control/base/lsim.m
+++ b/scripts/control/base/lsim.m
@@ -66,7 +66,7 @@
   if (columns (x0) > 1)
     error ("lsim: Initial condition vector should have only one column");
   endif
-  if (rows (x0) > rows p(a))
+  if (rows (x0) > rows (a))
     error ("lsim: Initial condition vector is too large");
   endif
 
--- a/scripts/control/hinf/hinf_ctr.m
+++ b/scripts/control/hinf/hinf_ctr.m
@@ -102,7 +102,7 @@
   md1112 = length (D1112);
   md1121 = length (D1121);
 
-  if (nd1111 == 0) || md1112 == 0)
+  if (nd1111 == 0 || md1112 == 0)
     d11hat = -D1122;
   else
     xx = inv (g*g*eye(nz-nu) - D1111*D1111');
--- a/scripts/control/hinf/hinfnorm.m
+++ b/scripts/control/hinf/hinfnorm.m
@@ -154,7 +154,7 @@
 
   ## check for scalar input arguments 2...5
   if (! isscalar (tol) && isscalar (gmin)
-      && isscalar (gmax) && isscalar (ptol)) )
+      && isscalar (gmax) && isscalar (ptol))
     error ("hinfnorm: tol, gmin, gmax, ptol must be scalars");
   endif
 
--- a/scripts/control/obsolete/packsys.m
+++ b/scripts/control/obsolete/packsys.m
@@ -45,7 +45,7 @@
   if (nargin == 5)
     if (! isscalar (dflg))
       [m, n] = size(dflg);
-      error (["packsys: dflg (%d,%d) must be a scalar", m, n);
+      error ("packsys: dflg (%d,%d) must be a scalar", m, n);
     elseif (dflg != 0 && dflg != 1)
       error ("packsys: dflg=%g must be 0 or 1", dflg);
     endif
--- a/scripts/control/system/ss.m
+++ b/scripts/control/system/ss.m
@@ -214,8 +214,9 @@
   endif
 
   ## check for tsam input
-  if (nargin < 5) tsam = 0;
-  elseif (! (is_sample (tsam) || tsam == 0)))
+  if (nargin < 5)
+    tsam = 0;
+  elseif (! (is_sample (tsam) || tsam == 0))
     error ("tsam must be a nonnegative real scalar");
   endif
 
--- a/scripts/control/system/sysappend.m
+++ b/scripts/control/system/sysappend.m
@@ -108,7 +108,7 @@
   endif
 
   if (make_d)
-    d = zeros (rows(c)+Ap, columns(b) + Am);
+    d = zeros (rows(c)+Ap, columns(b)+Am);
   endif
 
   ## Append new input(s) if any
@@ -171,7 +171,7 @@
 	error ("yd(%dx%d) must be a vector", rows (yd), columns (yd));
       elseif (rows (c) != length (yd) && rows (d) != length (yd))
 	error ("length(yd) = %d; c(%dx%d), d(%dx%d); mismatch",
-	       length (yd), rows (c), columns (c), rows (d), columns (d)));
+	       length (yd), rows (c), columns (c), rows (d), columns (d));
       endif
     else
       ## default yd values
--- a/scripts/control/system/sysconnect.m
+++ b/scripts/control/system/sysconnect.m
@@ -202,7 +202,7 @@
   ## nc
   ## disp("/sysconnect");
 
-  if ((nc > 0 & find (dyi > 0))
+  if ((nc > 0) & find (dyi > 0))
     B2con = B2(1:nc,dyi);       # connection to cont states
     C2hd = C2h(dyi,1:nc);       # cont states -> outputs
   else
--- a/scripts/control/system/sysprune.m
+++ b/scripts/control/system/sysprune.m
@@ -129,7 +129,7 @@
   if (! isstruct (sys))
     error ("Asys must be a system data structure (see ss, tf, or zp)");
   elseif (pp < lo)
-    error("%d output_idx entries, system has only %d outputs", lo, pp]);
+    error("%d output_idx entries, system has only %d outputs", lo, pp);
   elseif (mm < li)
     error("%d input_idx entries, system has only %d inputs", li, mm);
   elseif (nn+nz < lst)
--- a/scripts/control/system/tf2ss.m
+++ b/scripts/control/system/tf2ss.m
@@ -93,7 +93,7 @@
   nn = length (num);
   nd = length (den);
   if (nn > nd)
-    error ("deg(num)=%d > deg(den)= %d", nn, nd));
+    error ("deg(num)=%d > deg(den)= %d", nn, nd);
   endif
 
    ## Check sizes