changeset 3385:10f21f7ccc7f

[project @ 1999-12-15 22:28:26 by jwe]
author jwe
date Wed, 15 Dec 1999 22:28:52 +0000
parents 6735e4c759a2
children a5288b88446f
files scripts/control/DEMOcontrol.m scripts/control/abcddims.m scripts/control/analdemo.m scripts/control/axis2dlim.m scripts/control/bddemo.m scripts/control/bode.m scripts/control/bode_bounds.m scripts/control/bodquist.m scripts/control/buildssic.m scripts/control/com2str.m scripts/control/controldemo.m scripts/control/ctrb.m scripts/control/d2c.m scripts/control/damp.m scripts/control/dcgain.m scripts/control/dgkfdemo.m scripts/control/dgram.m scripts/control/dlqg.m scripts/control/dmr2d.m scripts/control/dre.m scripts/control/fir2sys.m scripts/control/frdemo.m scripts/control/freqchkw.m scripts/control/freqresp.m scripts/control/gram.m scripts/control/h2norm.m scripts/control/h2syn.m scripts/control/hinf_ctr.m scripts/control/hinfnorm.m scripts/control/hinfsyn.m scripts/control/hinfsyn_chk.m scripts/control/hinfsyn_ric.m scripts/control/impulse.m scripts/control/is_abcd.m scripts/control/is_controllable.m scripts/control/is_detectable.m scripts/control/is_dgkf.m scripts/control/is_digital.m scripts/control/is_observable.m scripts/control/is_sample.m scripts/control/is_signal_list.m scripts/control/is_siso.m scripts/control/is_stabilizable.m scripts/control/jet707.m scripts/control/lqg.m scripts/control/lsim.m scripts/control/ltifr.m scripts/control/minfo.m scripts/control/moddemo.m scripts/control/nichols.m scripts/control/nyquist.m scripts/control/obsv.m scripts/control/ord2.m scripts/control/outlist.m scripts/control/packsys.m scripts/control/parallel.m scripts/control/place.m scripts/control/polyout.m scripts/control/prompt.m scripts/control/pzmap.m scripts/control/qzval.m scripts/control/rldemo.m scripts/control/rlocus.m scripts/control/rotg.m scripts/control/series.m scripts/control/sortcom.m scripts/control/ss2sys.m scripts/control/ss2tf.m scripts/control/ss2zp.m scripts/control/starp.m scripts/control/step.m scripts/control/stepimp.m scripts/control/strappend.m scripts/control/susball.m scripts/control/swap.m scripts/control/swapcols.m scripts/control/swaprows.m scripts/control/sys2fir.m scripts/control/sys2ss.m scripts/control/sys2tf.m scripts/control/sys2zp.m scripts/control/sysadd.m scripts/control/sysappend.m scripts/control/syschnames.m scripts/control/syschnamesl.m scripts/control/syschtsam.m scripts/control/sysconnect.m scripts/control/syscont.m scripts/control/syscont_disc.m scripts/control/sysdefioname.m scripts/control/sysdefstname.m scripts/control/sysdimensions.m scripts/control/sysdisc.m scripts/control/sysdup.m scripts/control/sysgetsignals.m scripts/control/sysgettsam.m scripts/control/sysgettype.m scripts/control/sysgroup.m scripts/control/sysgroupn.m scripts/control/sysidx.m scripts/control/sysmin.m scripts/control/sysmult.m scripts/control/sysout.m scripts/control/sysprune.m scripts/control/sysreorder.m scripts/control/sysrepdemo.m scripts/control/sysscale.m scripts/control/syssetsignals.m scripts/control/syssub.m scripts/control/sysupdate.m scripts/control/tf2ss.m scripts/control/tf2sys.m scripts/control/tf2sysl.m scripts/control/tf2zp.m scripts/control/tfout.m scripts/control/tzero.m scripts/control/ugain.m scripts/control/unpacksys.m scripts/control/wgt1o.m scripts/control/zgfmul.m scripts/control/zgfslv.m scripts/control/zginit.m scripts/control/zgpbal.m scripts/control/zgreduce.m scripts/control/zgrownorm.m scripts/control/zgscal.m scripts/control/zgsgiv.m scripts/control/zgshsr.m scripts/control/zp2ss.m scripts/control/zp2ssg2.m scripts/control/zp2sys.m scripts/control/zp2tf.m scripts/control/zpout.m
diffstat 133 files changed, 228 insertions(+), 235 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/control/DEMOcontrol.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/DEMOcontrol.m	Wed Dec 15 22:28:52 1999 +0000
@@ -42,7 +42,7 @@
 ## Demo programs: bddemo.m, frdemo.m, analdemo.m, moddmeo.m, rldemo.m
 ## Written by David Clem August 15, 1994
 
-function DEMOcontrol()
+function DEMOcontrol ()
 
   disp(' O C T A V E    C O N T R O L   S Y S T E M S   T O O L B O X')
 
--- a/scripts/control/abcddims.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/abcddims.m	Wed Dec 15 22:28:52 1999 +0000
@@ -24,7 +24,7 @@
 ## @var{my} and @var{ny} are the row and column dimensions of the result.
 ## @end deftypefn
 
-function [y,my,ny] = abcddims (x)
+function [y, my, ny] = abcddims (x)
 ## Written by A. S. Hodel (scotte@eng.auburn.edu) Feb 1997
 
   y = x;
--- a/scripts/control/analdemo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/analdemo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -21,7 +21,7 @@
 ##  Octave Controls toolbox demo: State Space analysis demo
 ## @end deftypefn
 
-function analdemo()
+function analdemo ()
 ## Written by David Clem August 15, 1994
 ## Updated by John Ingram December 1996
   
--- a/scripts/control/axis2dlim.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/axis2dlim.m	Wed Dec 15 22:28:52 1999 +0000
@@ -29,7 +29,7 @@
 ##    @var{axvec} vector of axis limits appropriate for call to axis() function
 ## @end deftypefn
 
-function axvec = axis2dlim(axdata)
+function axvec = axis2dlim (axdata)
 
   if(isempty(axdata))
     axdata = 0;
--- a/scripts/control/bddemo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/bddemo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -21,7 +21,7 @@
 ##  Octave Controls toolbox demo: Block Diagram Manipulations demo
 ## @end deftypefn
  
-function bddemo()
+function bddemo ()
 
   ## Written by David Clem August 15, 1994
   ## Modified by A S Hodel Summer-Fall 1996
--- a/scripts/control/bode.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/bode.m	Wed Dec 15 22:28:52 1999 +0000
@@ -90,7 +90,7 @@
 ## @end enumerate
 ## @end deftypefn 
 
-function [mag_r,phase_r,w_r] = bode(sys,w,outputs,inputs,plot_style)
+function [mag_r, phase_r, w_r] = bode (sys, w, outputs, inputs, plot_style)
 
   ## Written by John Ingram  July 10th, 1996
   ## Based on previous code
--- a/scripts/control/bode_bounds.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/bode_bounds.m	Wed Dec 15 22:28:52 1999 +0000
@@ -25,7 +25,7 @@
 ## Used internally in freqresp (@code{bode}, @code{nyquist})
 ## @end deftypefn
  
-function [wmin,wmax] = bode_bounds(zer,pol,DIGITAL,tsam)
+function [wmin, wmax] = bode_bounds (zer, pol, DIGITAL, tsam)
 
   ## make sure zer,pol are row vectors
   if(!isempty(pol)) pol = reshape(pol,1,length(pol)); endif
--- a/scripts/control/bodquist.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/bodquist.m	Wed Dec 15 22:28:52 1999 +0000
@@ -50,7 +50,7 @@
 ## two functions.
 ## @end deftypefn
  
-function [f,w] = bodquist(sys,w,outputs,inputs,rname)
+function [f, w] = bodquist (sys, w, outputs, inputs, rname)
 
   ## check number of input arguments given
   if (nargin != 5)
--- a/scripts/control/buildssic.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/buildssic.m	Wed Dec 15 22:28:52 1999 +0000
@@ -17,7 +17,7 @@
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 
 
 ## -*- texinfo -*-
-## @deftypefn {Function File } {[@var{sys}] =} buildssic(@var{Clst}, @var{Ulst}, @var{Olst}, @var{Ilst}, @var{s1}, @var{s2}, @var{s3}, @var{s4}, @var{s5}, @var{s6}, @var{s7}, @var{s8})
+## @deftypefn {Function File } {@var{sys} =} buildssic(@var{Clst}, @var{Ulst}, @var{Olst}, @var{Ilst}, @var{s1}, @var{s2}, @var{s3}, @var{s4}, @var{s5}, @var{s6}, @var{s7}, @var{s8})
 ## 
 ## Contributed by Kai Mueller.
 ## 
@@ -86,7 +86,7 @@
 ## 
 ## The closed loop system GW can be optained by
 ## @example
-## GW = buildssic([1 2; 2 -1], [2], [1 2 3], [2], G, K);
+## GW = buildssic([1 2; 2 -1], 2, [1 2 3], 2, G, K);
 ## @end example
 ## @table @var
 ## @item Clst
@@ -120,18 +120,19 @@
 ## The closed loop system GW from [z; u]' to [v1; v2; y]' can be
 ## obtained by (all SISO systems):
 ## @example
-## GW = buildssic([1 4;2 4;3 1],[3],[2 3 5],[3 4],G,W1,W2,One);
+## GW = buildssic([1, 4; 2, 4; 3, 1], 3, [2, 3, 5],
+##                [3, 4], G, W1, W2, One);
 ## @end example
 ## where "One" is a unity gain (auxillary) function with order 0.
 ## (e.g. @code{One = ugain(1);})
 ## @end deftypefn
  
-function [sys] = buildssic(Clst,Ulst,Olst,Ilst,s1,s2,s3,s4,s5,s6,s7,s8)
+function sys = buildssic (Clst, Ulst, Olst, Ilst, s1, s2, s3, s4, s5, s6, s7, s8)
 
   ## Written by Kai Mueller April 1998
 
   if((nargin < 5) || (nargin > 12))
-    usage("[sys] = buildssic(Clst,Ulst,Olst,Ilst,s1,s2,s3,s4,s5,s6,s7,s8)");
+    usage("sys = buildssic(Clst,Ulst,Olst,Ilst,s1,s2,s3,s4,s5,s6,s7,s8)");
   endif
   if (nargin >= 5)
     if (!is_struct(s1))
--- a/scripts/control/com2str.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/com2str.m	Wed Dec 15 22:28:52 1999 +0000
@@ -24,7 +24,7 @@
 ##      0 (default):            -1, 0, 1,   1i,   1 + 0.5i
 ##      1 (for use with zpout): -1, 0, + 1, + 1i, + 1 + 0.5i
 
-function retval = com2str(zz,flg)
+function retval = com2str (zz, flg)
 
   if (nargin < 1 | nargin > 2)
     usage("com2str(zz{,flg})");
--- a/scripts/control/controldemo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/controldemo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -16,7 +16,7 @@
 ## along with Octave; see the file COPYING.  If not, write to the Free
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
 
-function DEMOcontrol()
+function DEMOcontrol ()
 ## Controls toolbox demo.
 ## Demo programs: bddemo.m, frdemo.m, analdemo.m, moddmeo.m, rldemo.m
 ##  
--- a/scripts/control/ctrb.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/ctrb.m	Wed Dec 15 22:28:52 1999 +0000
@@ -32,7 +32,7 @@
 ##        are much better for controllability tests.
 ## @end deftypefn
 
-function Qs = ctrb(sys, b)
+function Qs = ctrb (sys, b)
 
   ## Written by Kai P. Mueller November 4, 1997
   ## based on is_controllable.m of Scottedward Hodel
--- a/scripts/control/d2c.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/d2c.m	Wed Dec 15 22:28:52 1999 +0000
@@ -56,7 +56,7 @@
 ## 
 
  
-function csys = d2c(sys,opt)
+function csys = d2c (sys, opt)
 
   ## Written by R. Bruce Tenison August 23, 1994
   ## Updated by John Ingram for system data structure  August 1996
--- a/scripts/control/damp.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/damp.m	Wed Dec 15 22:28:52 1999 +0000
@@ -28,7 +28,7 @@
 ## See also: @code{eig}
 ## @end deftypefn
 
-function damp(p, tsam)
+function damp (p, tsam)
 
   ## Written by Kai P. Mueller September 29, 1997.
   ## Update
--- a/scripts/control/dcgain.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/dcgain.m	Wed Dec 15 22:28:52 1999 +0000
@@ -24,7 +24,7 @@
 ##       number of @var{A}-Matrix in @var{sys} (default @var{tol} = 1.0e-10)
 ## @end deftypefn
 
-function gm = dcgain(sys, tol)
+function gm = dcgain (sys, tol)
 ## Written by Kai P Mueller (mueller@ifr.ing.tu-bs.de) October 1, 1997
 
   if((nargin < 1) || (nargin > 2) || (nargout > 1))
--- a/scripts/control/dgkfdemo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/dgkfdemo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -21,7 +21,7 @@
 ## Octave Controls toolbox demo: H2/Hinfinity options demos
 ##@end deftypefn
  
-function dgkfdemo()
+function dgkfdemo ()
 ## Written by A. S. Hodel June 1995
  
   save_val = page_screen_output;
--- a/scripts/control/dgram.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/dgram.m	Wed Dec 15 22:28:52 1999 +0000
@@ -39,7 +39,7 @@
 ## 
 ## @end deftypefn
 
-function m = dgram(a,b)
+function m = dgram (a, b)
 
   ## Written by A. S. Hodel July 1995
 
--- a/scripts/control/dlqg.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/dlqg.m	Wed Dec 15 22:28:52 1999 +0000
@@ -43,7 +43,7 @@
 ##
 ## See also: lqg, dlqe, dlqr
 
-function [K,Q,P,Ee,Er] = dlqg(A,B,C,G,Sigw, Sigv,Q,R)
+function [K, Q, P, Ee, Er] = dlqg (A, B, C, G, Sigw, Sigv, Q, R)
 
   ## Written by A. S. Hodel August 1995
 
--- a/scripts/control/dmr2d.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/dmr2d.m	Wed Dec 15 22:28:52 1999 +0000
@@ -70,7 +70,7 @@
 ## 
 ## @end deftypefn
 
-function [dsys,fidx] = dmr2d (sys, idx, sprefix, Ts2,cuflg)
+function [dsys, fidx] = dmr2d (sys, idx, sprefix, Ts2, cuflg)
 
   ## Adapted from c2d by a.s.hodel@eng.auburn.edu
 
--- a/scripts/control/dre.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/dre.m	Wed Dec 15 22:28:52 1999 +0000
@@ -40,7 +40,7 @@
 ##   tvals is selected so that || nth(Plist,ii) - nth(Plist,ii-1) || < Ptol
 ##     for ii=2:length(tvals)
 
-function [tvals,Plist] = dre(sys,Q,R,Qf,t0,tf,Ptol,maxits)
+function [tvals, Plist] = dre (sys, Q, R, Qf, t0, tf, Ptol, maxits)
 
   if(nargin < 6 | nargin > 8 | nargout != 2)
     usage("[tvals,Plist] = dre(sys,Q,R,Qf,t0,tf{,Ptol})");
--- a/scripts/control/fir2sys.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/fir2sys.m	Wed Dec 15 22:28:52 1999 +0000
@@ -67,7 +67,7 @@
 ## @end example
 ## @end deftypefn
  
-function sys = fir2sys (num,tsam,inname,outname)
+function sys = fir2sys (num, tsam, inname, outname)
 
   ## Written by R. Bruce Tenison  July 29, 1994
   ## Name changed to TF2SYS July 1995
--- a/scripts/control/frdemo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/frdemo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -21,7 +21,7 @@
 ## Octave Controls toolbox demo: Frequency Response demo
 ## @end deftypefn
 
-function frdemo()
+function frdemo ()
 
   ## Written by David Clem August 15, 1994 
 
--- a/scripts/control/freqchkw.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/freqchkw.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,7 @@
 ## Returns boolean value.
 ## @end deftypefn
 
-function USEW = freqchkw(w)
+function USEW = freqchkw (w)
 
   ## A S Hodel July 1996
 
--- a/scripts/control/freqresp.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/freqresp.m	Wed Dec 15 22:28:52 1999 +0000
@@ -39,7 +39,7 @@
 ## @end table
 ## @end deftypefn
 
-function [ff,w] = freqresp(sys,USEW,w);
+function [ff, w] = freqresp (sys, USEW, w);
 
   ## Written by: R. Bruce Tenison July 11, 1994
   ## SYS_INTERNAL accesses members of system data structure
--- a/scripts/control/gram.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/gram.m	Wed Dec 15 22:28:52 1999 +0000
@@ -24,7 +24,7 @@
 ## @var{m} satisfies @math{ a m + m a' + b b' = 0 }.
 ## @end deftypefn
 
-function m = gram(a,b)
+function m = gram (a, b)
 
   ## Written by A. S. Hodel 
 
--- a/scripts/control/h2norm.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/h2norm.m	Wed Dec 15 22:28:52 1999 +0000
@@ -25,7 +25,7 @@
 ##  H2 and Hinf Control Problems", IEEE TAC August 1989
 ## @end deftypefn
 
-function h2gain = h2norm(sys)
+function h2gain = h2norm (sys)
 
   ## A. S. Hodel Aug 1995
   ## updated for system data structure by John Ingram November 1996
--- a/scripts/control/h2syn.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/h2syn.m	Wed Dec 15 22:28:52 1999 +0000
@@ -58,7 +58,7 @@
 ## @end table
 ## @end deftypefn
  
-function [K,gain, Kc, Kf, Pc,  Pf] = h2syn(Asys,nu,ny,tol)
+function [K, gain, Kc, Kf, Pc, Pf] = h2syn (Asys, nu, ny, tol)
 
   ## Updated for System structure December 1996 by John Ingram
 
--- a/scripts/control/hinf_ctr.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/hinf_ctr.m	Wed Dec 15 22:28:52 1999 +0000
@@ -35,7 +35,7 @@
 ## Do not attempt to use this at home; no argument checking performed.
 ## @end deftypefn
   
-function K = hinf_ctr(dgs,F,H,Z,g)
+function K = hinf_ctr (dgs, F, H, Z, g)
 
   ## A. S. Hodel August 1995
   ## Revised by Kai P Mueller April 1998 to solve the general H_infinity
--- a/scripts/control/hinfnorm.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/hinfnorm.m	Wed Dec 15 22:28:52 1999 +0000
@@ -63,7 +63,7 @@
 ##  $Revision: 1.9 $
 ## @end deftypefn
  
-function [g, gmin, gmax] = hinfnorm(sys,tol,gmin,gmax,ptol)
+function [g, gmin, gmax] = hinfnorm (sys, tol, gmin, gmax, ptol)
 
   if((nargin == 0) || (nargin > 4))
     usage("[g gmin gmax] = hinfnorm(sys[,tol,gmin,gmax,ptol])");
--- a/scripts/control/hinfsyn.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/hinfsyn.m	Wed Dec 15 22:28:52 1999 +0000
@@ -75,7 +75,7 @@
 ## @end enumerate
 ## @end deftypefn
  
-function [K,g,GW,Xinf,Yinf] = hinfsyn(Asys,nu,ny,gmin,gmax,gtol,ptol,tol)
+function [K, g, GW, Xinf, Yinf] = hinfsyn (Asys, nu, ny, gmin, gmax, gtol, ptol, tol)
 
   ## A. S. Hodel August 1995
   ## Updated for Packed system structures December 1996 by John Ingram
--- a/scripts/control/hinfsyn_chk.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/hinfsyn_chk.m	Wed Dec 15 22:28:52 1999 +0000
@@ -45,7 +45,7 @@
 ## Do not attempt to use this at home; no argument checking performed.
 ## @end deftypefn 
 
-function [retval,Pc,Pf] = hinfsyn_chk(A,B1,B2,C1,C2,D12,D21,g,ptol)
+function [retval, Pc, Pf] = hinfsyn_chk (A, B1, B2, C1, C2, D12, D21, g, ptol)
 
   ## A. S. Hodel August 1995
 
--- a/scripts/control/hinfsyn_ric.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/hinfsyn_ric.m	Wed Dec 15 22:28:52 1999 +0000
@@ -32,7 +32,7 @@
 ##    5: Xinf not positive definite
 ##    6: R is singular
 
-function [Xinf,x_ha_err] = hinfsyn_ric(A,BB,C1,d1dot,R,ptol)
+function [Xinf, x_ha_err] = hinfsyn_ric (A, BB, C1, d1dot, R, ptol)
 
   x_ha_err = 0;        # assume success
   Xinf = [];		     # default return value
--- a/scripts/control/impulse.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/impulse.m	Wed Dec 15 22:28:52 1999 +0000
@@ -44,7 +44,7 @@
  
 ## See also:  step, stepimp
 
-function [y, t] = impulse(sys, inp, tstop, n)
+function [y, t] = impulse (sys, inp, tstop, n)
 
 ## Written by Kai P. Mueller October 2, 1997
 ## based on lsim.m of Scottedward Hodel
--- a/scripts/control/is_abcd.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_abcd.m	Wed Dec 15 22:28:52 1999 +0000
@@ -25,7 +25,7 @@
 
 ## See also: abcddim
 
-function retval = is_abcd(a, b, c, d)
+function retval = is_abcd (a, b, c, d)
 
   ## Written by Kai P. Mueller November 4, 1997
   ## based on is_controllable.m of Scottedward Hodel
--- a/scripts/control/is_controllable.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_controllable.m	Wed Dec 15 22:28:52 1999 +0000
@@ -58,7 +58,7 @@
 ## See also: size, rows, columns, length, is_matrix, is_scalar, is_vector
 ##     is_observable, is_stabilizable, is_detectable, krylov, krylovb
 
-function [retval,U] = is_controllable (a, b, tol)
+function [retval, U] = is_controllable (a, b, tol)
 
   ## Written by A. S. Hodel (scotte@eng.auburn.edu) August, 1993.
   ## Updated by A. S. Hodel (scotte@eng.auburn.edu) Aubust, 1995 to use krylovb 
--- a/scripts/control/is_detectable.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_detectable.m	Wed Dec 15 22:28:52 1999 +0000
@@ -33,7 +33,7 @@
 
 ## See also: size, rows, columns, length, is_matrix, is_scalar, is_vector.
 
-function [retval,U] = is_detectable (a,c,tol)
+function [retval, U] = is_detectable (a, c, tol)
 
   ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993.
   ## Updated by John Ingram (ingraje@eng.auburn.edu) July 1996.
--- a/scripts/control/is_dgkf.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_dgkf.m	Wed Dec 15 22:28:52 1999 +0000
@@ -94,7 +94,7 @@
 ## 
 ## @end deftypefn
  
-function [retval,dgkf_struct] = is_dgkf(Asys,nu,ny,tol)
+function [retval, dgkf_struct] = is_dgkf (Asys, nu, ny, tol)
 
   ## Written by A. S. Hodel
   ## Updated by John Ingram July 1996 to accept structured systems
--- a/scripts/control/is_digital.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_digital.m	Wed Dec 15 22:28:52 1999 +0000
@@ -32,7 +32,7 @@
 ## Exits with an error of sys is a mixed (continuous and discrete) system
 ## @end deftypefn
 
-function DIGITAL = is_digital(sys,eflg)
+function DIGITAL = is_digital (sys, eflg)
 
   ## a s hodel July 1996
 
--- a/scripts/control/is_observable.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_observable.m	Wed Dec 15 22:28:52 1999 +0000
@@ -32,7 +32,7 @@
 
 ## See also: size, rows, columns, length, is_matrix, is_scalar, is_vector.
 
-function [retval,U] = is_observable (a,c,tol)
+function [retval, U] = is_observable (a, c, tol)
 
   ## Written by A. S. Hodel (scotte@eng.auburn.edu) August 1993.
   ## Updated by John Ingram (ingraje@eng.auburn.edu) July 1996.
--- a/scripts/control/is_sample.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_sample.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,7 @@
 ##  (real,scalar, > 0)
 ## @end deftypefn
  
-function out = is_sample(Ts)
+function out = is_sample (Ts)
 ## A. S. Hodel July 1995
 
 out = (is_scalar(Ts) && (Ts == abs(Ts)) && (Ts != 0) );
--- a/scripts/control/is_signal_list.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_signal_list.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,7 @@
 ## to @var{syssetsignals}).
 ## @end deftypefn
 
-function flg = is_signal_list(mylist)
+function flg = is_signal_list (mylist)
 flg = is_list(mylist);
 if(flg)
   for ii=1:length(mylist)
--- a/scripts/control/is_siso.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_siso.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,7 @@
 ## @var{sys} is single-input, single-output.
 ## @end deftypefn
  
-function  SISO = is_siso(sys)
+function  SISO = is_siso (sys)
 ## function SISO = is_siso(sys)
 ## return nonzero if the system sys is single-input, single-output.
 
--- a/scripts/control/is_stabilizable.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/is_stabilizable.m	Wed Dec 15 22:28:52 1999 +0000
@@ -41,7 +41,7 @@
 ## See also: size, rows, columns, length, is_matrix, is_scalar, is_vector
 ##     is_observable, is_stabilizable, is_detectable
 
-function [retval,U] = is_stabilizable (a, b, tol)
+function [retval, U] = is_stabilizable (a, b, tol)
 
   ## Written by A. S. Hodel (scotte@eng.auburn.edu) August, 1993.
   ## Updated by A. S. Hodel (scotte@eng.auburn.edu) Aubust, 1995 to use krylovb 
--- a/scripts/control/jet707.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/jet707.m	Wed Dec 15 22:28:52 1999 +0000
@@ -29,7 +29,7 @@
 ## Contributed by Kai Mueller
 ## @end deftypefn
  
-function outsys = jet707()
+function outsys = jet707 ()
 
   ## Written by Kai P. Mueller September 28, 1997
   ## Updates
--- a/scripts/control/lqg.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/lqg.m	Wed Dec 15 22:28:52 1999 +0000
@@ -61,7 +61,7 @@
 
 ## See also:  h2syn, lqe, lqr
 
-function [K,Q1,P1,Ee,Er] = lqg(sys,Sigw,Sigv,Q,R,input_list)
+function [K, Q1, P1, Ee, Er] = lqg (sys, Sigw, Sigv, Q, R, input_list)
 
   ## Written by A. S. Hodel August 1995; revised for new system format
   ## August 1996
--- a/scripts/control/lsim.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/lsim.m	Wed Dec 15 22:28:52 1999 +0000
@@ -34,7 +34,7 @@
 ## and x = system states.
 ## @end deftypefn
  
-function [y,x] = lsim(sys,u,t,x0)
+function [y, x] = lsim (sys, u, t, x0)
 
   ## Written by David Clem, A. S. Hodel July 1995
   ## modified by John Ingram for system format August 1996
--- a/scripts/control/ltifr.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/ltifr.m	Wed Dec 15 22:28:52 1999 +0000
@@ -38,7 +38,7 @@
 ## for complex frequencies @math{s = jw}.
 ## @end deftypefn
 
-function out = ltifr(a,b,w)
+function out = ltifr (a, b, w)
 
   ## R. B. Tenison, D. Clem, A. S. Hodel, July 1995
   ## updated by John Ingram August 1996 for system format
--- a/scripts/control/minfo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/minfo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -29,7 +29,7 @@
 ##      ncstates is the number of continuous states of the system
 ##	 ndstates is the number of discrete states of the system
 
-function [systype, nout, nin, ncstates, ndstates] = minfo(inmat)
+function [systype, nout, nin, ncstates, ndstates] = minfo (inmat)
 
   ## Written by R. Bruce Tenison July 29, 1994
   ## Modified by David Clem November 13, 1994
--- a/scripts/control/moddemo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/moddemo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -25,7 +25,7 @@
 ## @end format
 ## @end deftypefn
  
-function moddemo()
+function moddemo ()
 ## Written by David Clem August 15, 1994
 ## a s hodel: updated to reflect updated output order in ss2zp
 
--- a/scripts/control/nichols.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/nichols.m	Wed Dec 15 22:28:52 1999 +0000
@@ -50,7 +50,7 @@
 ## Note: if the requested plot is for an MIMO system, mag is set to
 ## ||G(jw)|| or ||G(exp(jwT))|| and phase information is not computed.
 
-function [mag,phase,w] = nichols(sys,w,outputs,inputs)
+function [mag, phase, w] = nichols (sys, w, outputs, inputs)
 
   ## check number of input arguments given
   if (nargin < 1 | nargin > 4)
--- a/scripts/control/nyquist.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/nyquist.m	Wed Dec 15 22:28:52 1999 +0000
@@ -84,7 +84,7 @@
 ## 
 ## @end deftypefn
  
-function [realp,imagp,w] = nyquist(sys,w,outputs,inputs,atol)
+function [realp, imagp, w] = nyquist (sys, w, outputs, inputs, atol)
    
   ## By R. Bruce Tenison, July 13, 1994
   ## A. S. Hodel July 1995 (adaptive frequency spacing, 
--- a/scripts/control/obsv.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/obsv.m	Wed Dec 15 22:28:52 1999 +0000
@@ -36,7 +36,7 @@
 ##        are much better for observability tests.
 ## @end deftypefn
 
-function Qb = obsv(sys, c)
+function Qb = obsv (sys, c)
 
   ## Written by Kai P. Mueller November 4, 1997
   ## modified by
--- a/scripts/control/ord2.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/ord2.m	Wed Dec 15 22:28:52 1999 +0000
@@ -42,7 +42,7 @@
 
 ## See also: jet707 (MIMO example, Boeing 707-321 aircraft model)
 
-function outsys = ord2(nfreq, damp, gain)
+function outsys = ord2 (nfreq, damp, gain)
 
   ## Written by Kai P. Mueller September 28, 1997
   ## Updates
--- a/scripts/control/outlist.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/outlist.m	Wed Dec 15 22:28:52 1999 +0000
@@ -42,7 +42,7 @@
 ## 
 ## @end deftypefn
 
-function str_val = outlist(name_list,tabchar,yd,ilist)
+function str_val = outlist (name_list, tabchar, yd, ilist)
 
   ## A. S. Hodel Dec. 1995, 1998
 
--- a/scripts/control/packsys.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/packsys.m	Wed Dec 15 22:28:52 1999 +0000
@@ -27,7 +27,7 @@
 ## 
 ## Note: discrete-state sampling time is not included!
 
-function Asys = packsys(a,b,c,d,dflg)
+function Asys = packsys (a, b, c, d, dflg)
 
   
   ## Written by R. Bruce Tenison  July 29, 1994
--- a/scripts/control/parallel.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/parallel.m	Wed Dec 15 22:28:52 1999 +0000
@@ -29,7 +29,7 @@
 ##              --------------------
 ##                   Ksys
 
-function sysp = parallel(Asys,Bsys)
+function sysp = parallel (Asys, Bsys)
 
   ## Written by David Clem August 15, 1994
   ## completely rewritten Oct 1996 a s hodel
--- a/scripts/control/place.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/place.m	Wed Dec 15 22:28:52 1999 +0000
@@ -28,7 +28,7 @@
 ## Written by: Jose Daniel Munoz Frias.
 ## @end deftypefn
  
-function K = place(sys, P) 
+function K = place (sys, P) 
 
   ## Universidad Pontificia Comillas
   ## ICAIdea
--- a/scripts/control/polyout.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/polyout.m	Wed Dec 15 22:28:52 1999 +0000
@@ -29,7 +29,7 @@
 ##  See also: polyval, polyvalm, poly, roots, conv, deconv, residue, 
 ##	filter, polyderiv, polyinteg
 
-function y = polyout(c,x)
+function y = polyout (c, x)
 
 ## Written by A. Scottedward Hodel (scotte@eng.auburn.edu) May 1995)
 ## Nov 1998: Correctly handles complex coefficients
--- a/scripts/control/prompt.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/prompt.m	Wed Dec 15 22:28:52 1999 +0000
@@ -29,7 +29,7 @@
 ## @end format
 ## @end deftypefn
  
-function prompt(str)
+function prompt (str)
 
 if(nargin > 1)
   usage("prompt([str])");
--- a/scripts/control/pzmap.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/pzmap.m	Wed Dec 15 22:28:52 1999 +0000
@@ -28,7 +28,7 @@
 ##           (see sys2zp for a preferable function call)
 ## @end deftypefn
  
-function [zer,pol]=pzmap(sys)
+function [zer, pol]=pzmap (sys)
 
   save_emp = empty_list_elements_ok;
 
--- a/scripts/control/qzval.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/qzval.m	Wed Dec 15 22:28:52 1999 +0000
@@ -35,7 +35,7 @@
 ## @strong{Note} @code{qzval} is obsolete; use @code{qz} instead.
 ## @end deftypefn
  
-function lam = qzval(A,B)
+function lam = qzval (A, B)
 ## A. S. Hodel July 1998
 
   warning("qzval is obsolete; calling qz instead")
--- a/scripts/control/rldemo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/rldemo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -21,7 +21,7 @@
 ##Octave Controls toolbox demo: Root Locus demo
 ##@end deftypefn
  
-function rldemo()
+function rldemo ()
 ## Written by David Clem August 15, 1994
 ## Updated by John Ingram December 1996
 
--- a/scripts/control/rlocus.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/rlocus.m	Wed Dec 15 22:28:52 1999 +0000
@@ -40,7 +40,7 @@
 ## @end format
 ## @end deftypefn
 
-function [rldata,k_break,rlpol,gvec,real_ax_pts] = rlocus(sys,increment,min_k,max_k)
+function [rldata, k_break, rlpol, gvec, real_ax_pts] = rlocus (sys, increment, min_k, max_k)
 
   ## Convert the input to a transfer function if necessary
   ## Written by Clem and Tenison
--- a/scripts/control/rotg.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/rotg.m	Wed Dec 15 22:28:52 1999 +0000
@@ -21,7 +21,7 @@
 ##
 ## NOTE: Use [c,s] = givens(a,b) instead.
 
-function [c,s] = rotg(a,b)
+function [c, s] = rotg (a, b)
 
   [c,s] = givens(a,b);
 endfunction
--- a/scripts/control/series.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/series.m	Wed Dec 15 22:28:52 1999 +0000
@@ -16,7 +16,7 @@
 ## along with Octave; see the file COPYING.  If not, write to the Free 
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 
  
-function [a,b,c,d] = series(a1,b1,c1,d1,a2,b2,c2,d2)
+function [a, b, c, d] = series (a1, b1, c1, d1, a2, b2, c2, d2)
 ## Forms the series connection of two systems.
 ##
 ## Superseded by sysmult.  Do not use this routine!
--- a/scripts/control/sortcom.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sortcom.m	Wed Dec 15 22:28:52 1999 +0000
@@ -35,7 +35,7 @@
 ## @end format
 ## @end deftypefn
 
-function [yy,idx] = sortcom(xx,opt)
+function [yy, idx] = sortcom (xx, opt)
 
   ## Written by A. S. Hodel June 1995
 
--- a/scripts/control/ss2sys.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/ss2sys.m	Wed Dec 15 22:28:52 1999 +0000
@@ -187,7 +187,7 @@
 ## 
 ## @end deftypefn
 
-function  retsys = ss2sys  (a,b,c,d,tsam,n,nz,stname,inname,outname,outlist)
+function  retsys = ss2sys (a, b, c, d, tsam, n, nz, stname, inname, outname, outlist)
 
   ## Written by John Ingram (ingraje@eng.auburn.edu)  July 20, 1996
 
--- a/scripts/control/ss2tf.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/ss2tf.m	Wed Dec 15 22:28:52 1999 +0000
@@ -38,7 +38,7 @@
 ## @end format
 ## @end deftypefn
  
-function [num,den] = ss2tf(a,b,c,d)
+function [num, den] = ss2tf (a, b, c, d)
 
   ## Written by R. Bruce Tenison (June 24, 1994) btenison@eng.auburn.edu
   ## a s hodel: modified to allow for pure gain blocks Aug 1996
--- a/scripts/control/ss2zp.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/ss2zp.m	Wed Dec 15 22:28:52 1999 +0000
@@ -31,7 +31,7 @@
 ## @end deftypefn
 
  
-function [zer,pol,k] = ss2zp(a,b,c,d)
+function [zer, pol, k] = ss2zp (a, b, c, d)
 
   ## Written by David Clem August 15, 1994
   ## Hodel: changed order of output arguments to zer, pol, k. July 1996
--- a/scripts/control/starp.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/starp.m	Wed Dec 15 22:28:52 1999 +0000
@@ -20,7 +20,7 @@
 ## @deftypefn {Function File } { outputs =} starp ( inputs ) 
 ## @format
 ## 
-##  [sys] = starp(P, K, ny, nu)
+##  sys = starp(P, K, ny, nu)
 ## 
 ##  Redheffer star product or upper/lower LFT, respectively.
 ## 
@@ -49,12 +49,12 @@
 ## @end format
 ## @end deftypefn
 
-function [sys] = starp(P, K, ny, nu);
+function sys = starp (P, K, ny, nu);
 
   ## Written by Kai Mueller May 1998
 
   if((nargin != 2) && (nargin != 4))
-    usage("[sys] = starp(P, K, ny, nu)");
+    usage("sys = starp(P, K, ny, nu)");
   endif
   if (!is_struct(P))
     error("---> P must be in system data structure");
--- a/scripts/control/step.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/step.m	Wed Dec 15 22:28:52 1999 +0000
@@ -62,7 +62,7 @@
 ##
 ## See also: impulse, stepimp
 
-function [y, t] = step(sys, inp, tstop, n)
+function [y, t] = step (sys, inp, tstop, n)
 ## Written by Kai P. Mueller September 30, 1997
 ## based on lsim.m of Scottedward Hodel
 ## modified by
--- a/scripts/control/stepimp.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/stepimp.m	Wed Dec 15 22:28:52 1999 +0000
@@ -32,7 +32,7 @@
 
 ## See also: step, impulse
 
-function [y, t] = stepimp(sitype, sys, inp, tstop, n)
+function [y, t] = stepimp (sitype, sys, inp, tstop, n)
 
   ## Written by Kai P. Mueller October 2, 1997
   ## based on lsim.m of Scottedward Hodel
--- a/scripts/control/strappend.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/strappend.m	Wed Dec 15 22:28:52 1999 +0000
@@ -16,7 +16,7 @@
 ## along with Octave; see the file COPYING.  If not, write to the Free 
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 
  
-function retval = strappend(strlist,suffix);
+function retval = strappend (strlist, suffix);
 
   ## retval = strappend(strlist,suffix);
   ## append string suffix to each string in the list of strings strlist
--- a/scripts/control/susball.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/susball.m	Wed Dec 15 22:28:52 1999 +0000
@@ -19,108 +19,83 @@
 ## -*- texinfo -*-
 ## @deftypefn {Function File } { outputs =} susball ( inputs ) 
 ## @format
-## 
-## @end format
-## @end deftypefn
-## @deftypefn {Function File } { outputs =} swap ( inputs ) 
-## @format
-##  [a1,b1] = swap(a,b)
-##  interchange a and b
-## 
-## 
-## @end format
-## @end deftypefn
-## @deftypefn {Function File } { outputs =} swapcols ( inputs ) 
-## @format
-##  function B = swapcols(A)
-##  permute columns of A into reverse order
-## 
-## 
-## @end format
-## @end deftypefn
-## @deftypefn {Function File } { outputs =} swaprows ( inputs ) 
-## @format
-##  function B = swaprows(A)
-##  permute rows of A into reverse order
-## 
-## 
 ## @end format
 ## @end deftypefn
 
-    cmd = "ballsys = margetsys(""disc"")";
-    eval(cmd);
-    
-    disp("Design LQG controller");
-    cmd = "sysout(ballsys)";
-    run_cmd
-    disp("add noise inputs to system...")
- 
-    disp("discrete system:")
-    [nn,nz,mm,pp] = sysdimensions(ballsys);
-    cmd = "ballsys = sysappend(ballsys,nz);";
-    run_cmd 
+cmd = "ballsys = margetsys(""disc"")";
+eval(cmd);
+
+disp("Design LQG controller");
+cmd = "sysout(ballsys)";
+run_cmd
+disp("add noise inputs to system...")
 
-    cmd = "sysout(ballsys)";
-    run_cmd
+disp("discrete system:")
+[nn,nz,mm,pp] = sysdimensions(ballsys);
+cmd = "ballsys = sysappend(ballsys,nz);";
+run_cmd 
+
+cmd = "sysout(ballsys)";
+run_cmd
 
-    disp("Notice the two additional inputs, u_2, and u_3.  These are the ");
-    disp("""entry points"" for the gaussian noise disturbance.");
-    disp(" ");
-    disp("We'll design the controller to use only position feedback:")
+disp("Notice the two additional inputs, u_2, and u_3.  These are the ");
+disp("""entry points"" for the gaussian noise disturbance.");
+disp(" ");
+disp("We'll design the controller to use only position feedback:")
 
-    cmd = "ballsys=sysprune(ballsys,1,[]);";
-    run_cmd
-    cmd = "sysout(ballsys)";
-    run_cmd
+cmd = "ballsys=sysprune(ballsys,1,[]);";
+run_cmd
+cmd = "sysout(ballsys)";
+run_cmd
 
-    disp("Now design an LQG controller: Sigw: input noise")
-    Sigw = eye(2)
-    disp("Now design an LQG controller: Sigv: measurement noise")
-    Sigv = eye(pp);
+disp("Now design an LQG controller: Sigw: input noise")
+Sigw = eye(2)
+disp("Now design an LQG controller: Sigv: measurement noise")
+Sigv = eye(pp);
 
-    disp("State and input penalties:")
-    Q = eye(2)
-    R = 1
-    disp("Controlled input is input 1");
+disp("State and input penalties:")
+Q = eye(2)
+R = 1
+disp("Controlled input is input 1");
 
-    cmd="Ksys = lqg(ballsys,Sigw,Sigv,Q,R,1);";
-    run_cmd
+cmd="Ksys = lqg(ballsys,Sigw,Sigv,Q,R,1);";
+run_cmd
 
-    disp("sysout(Ksys);");
-    sysout(Ksys);
+disp("sysout(Ksys);");
+sysout(Ksys);
 
-    disp("\nGet rid of the disturbance inputs");
-    cmd = "ballsys = sysprune(ballsys,1,1);"
-    run_cmd;
-    sysout(ballsys);
-    sysout(ballsys,"zp");
+disp("\nGet rid of the disturbance inputs");
+cmd = "ballsys = sysprune(ballsys,1,1);"
+run_cmd;
+sysout(ballsys);
+sysout(ballsys,"zp");
 
-    disp("\nGrouping the plant and the controller");
-    cmd = "closed_loop = sysgroup(ballsys,Ksys);"
-    run_cmd;
-    sysout(closed_loop);
+disp("\nGrouping the plant and the controller");
+cmd = "closed_loop = sysgroup(ballsys,Ksys);"
+run_cmd;
+sysout(closed_loop);
 
-    disp("\nduplicating the plant input");
-    cmd = "closed_loop = sysdup(closed_loop,[],1);"
-    run_cmd;
-    sysout(closed_loop);
+disp("\nduplicating the plant input");
+cmd = "closed_loop = sysdup(closed_loop,[],1);"
+run_cmd;
+sysout(closed_loop);
 
-##    disp("\nscaling the duplicated input by -1");
-##    cmd = "closed_loop = sysscale(closed_loop,[],diag([1,1,1]));"
-##    run_cmd;
-##    sysout(closed_loop);
+## disp("\nscaling the duplicated input by -1");
+## cmd = "closed_loop = sysscale(closed_loop,[],diag([1,1,1]));"
+## run_cmd;
+## sysout(closed_loop);
 
-    disp("\nconnecting plant output to controller input and controller output");
-    disp("to the duplicated plant input");
-    cmd = "closed_loop = sysconnect(closed_loop,[1 2],[2 3]);"
-    run_cmd;
-    sysout(closed_loop);
+disp("\nconnecting plant output to controller input and controller output");
+disp("to the duplicated plant input");
+cmd = "closed_loop = sysconnect(closed_loop,[1 2],[2 3]);"
+run_cmd;
+sysout(closed_loop);
 
-    disp("\nkeeping only the original plant input and plant output");
-    cmd = "closed_loop = sysprune(closed_loop,1,1);"
-    run_cmd;
-    sysout(closed_loop);
+disp("\nkeeping only the original plant input and plant output");
+cmd = "closed_loop = sysprune(closed_loop,1,1);"
+run_cmd;
+sysout(closed_loop);
 
-    sysout(closed_loop,"zp");
+sysout(closed_loop,"zp");
 
- 
+
--- a/scripts/control/swap.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/swap.m	Wed Dec 15 22:28:52 1999 +0000
@@ -15,11 +15,16 @@
 ## You should have received a copy of the GNU General Public License 
 ## along with Octave; see the file COPYING.  If not, write to the Free 
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 
- 
-## usage: [a1,b1] = swap(a,b)
-## interchange a and b
 
-function [a1,b1] = swap(a,b)
+## -*- texinfo -*-
+## @deftypefn {Function File } { outputs =} swap ( inputs ) 
+## @format
+##  [a1,b1] = swap(a,b)
+##  interchange a and b
+## @end format
+## @end deftypefn
+
+function [a1, b1] = swap (a, b)
 
   ## A. S. Hodel July 24 1992
   ## Conversion to Octave R. Bruce Tenison July 4, 1994
--- a/scripts/control/swapcols.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/swapcols.m	Wed Dec 15 22:28:52 1999 +0000
@@ -16,10 +16,15 @@
 ## along with Octave; see the file COPYING.  If not, write to the Free 
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 
  
-## usage: B = swapcols(A)
-## permute columns of A into reverse order
+## -*- texinfo -*-
+## @deftypefn {Function File } { outputs =} swapcols ( inputs ) 
+## @format
+##  function B = swapcols(A)
+##  permute columns of A into reverse order
+## @end format
+## @end deftypefn
 
-function B = swapcols(A)
+function B = swapcols (A)
   
   ## A. S. Hodel July 23, 1992
   ## Conversion to Octave R. Bruce Tenison July 4, 1994
--- a/scripts/control/swaprows.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/swaprows.m	Wed Dec 15 22:28:52 1999 +0000
@@ -15,11 +15,16 @@
 ## You should have received a copy of the GNU General Public License 
 ## along with Octave; see the file COPYING.  If not, write to the Free 
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 
- 
-## usage: B = swaprows(A)
-## permute rows of A into reverse order
 
-function B = swaprows(A)
+## -*- texinfo -*-
+## @deftypefn {Function File } { outputs =} swaprows ( inputs ) 
+## @format
+##  function B = swaprows(A)
+##  permute rows of A into reverse order
+## @end format
+## @end deftypefn
+
+function B = swaprows (A)
 
   ## A. S. Hodel July 23, 1992
   ## Conversion to Octave R. Bruce Tenison July 4, 1994
--- a/scripts/control/sys2fir.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sys2fir.m	Wed Dec 15 22:28:52 1999 +0000
@@ -26,7 +26,7 @@
 
 ## See also: fir2sys
  
-function [c,tsam,inname,outname] = sys2fir(sys)
+function [c, tsam, inname, outname] = sys2fir (sys)
 
   ## a s hodel July 1996
 
--- a/scripts/control/sys2ss.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sys2ss.m	Wed Dec 15 22:28:52 1999 +0000
@@ -62,7 +62,7 @@
 ## @end example
 ## @end deftypefn
  
-function [a,b,c,d,tsam,n,nz,stname,inname,outname,yd] = sys2ss(sys)
+function [a, b, c, d, tsam, n, nz, stname, inname, outname, yd] = sys2ss (sys)
 
   ## Written by David Clem August 19, 1994
   ## Updates by John Ingram July 14, 1996
--- a/scripts/control/sys2tf.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sys2tf.m	Wed Dec 15 22:28:52 1999 +0000
@@ -31,7 +31,7 @@
 ## @end example
 ## @end deftypefn
 
-function [num,den,tsam,inname,outname] = sys2tf(Asys)
+function [num, den, tsam, inname, outname] = sys2tf (Asys)
 ## Written by R. Bruce Tenison (June 24, 1994) btenison@eng.auburn.edu
 ## modified to make sys2tf by A. S. Hodel Aug 1995
 ## modified again for updated system format by John Ingram July 1996
--- a/scripts/control/sys2zp.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sys2zp.m	Wed Dec 15 22:28:52 1999 +0000
@@ -35,7 +35,7 @@
 ## @end example
 ## @end deftypefn
  
-function [zer,pol,k,tsam,inname,outname] = sys2zp(sys)
+function [zer, pol, k, tsam, inname, outname] = sys2zp (sys)
 
   ## Created by John Ingram July 15 1996
 
--- a/scripts/control/sysadd.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysadd.m	Wed Dec 15 22:28:52 1999 +0000
@@ -39,7 +39,7 @@
 ## @end example
 ## @end deftypefn
  
-function sys = sysadd(...)
+function sys = sysadd (...)
 
   ## Written by John Ingram July 1996
   ## Updated for variable number of arguments July 1999 A. S. Hodel
--- a/scripts/control/sysappend.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysappend.m	Wed Dec 15 22:28:52 1999 +0000
@@ -74,7 +74,7 @@
 ## 
 ## @end deftypefn
 
-function retsys = sysappend(sys,b,c,d,outname,inname,yd)
+function retsys = sysappend (sys, b, c, d, outname, inname, yd)
 
   ## written by John Ingram August 1996
   
--- a/scripts/control/syschnames.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/syschnames.m	Wed Dec 15 22:28:52 1999 +0000
@@ -21,7 +21,7 @@
 ## Superseded by @code{syssetsignals}
 ## @end deftypefn
 
-function retsys = syschnames(sys,opt,list,names)
+function retsys = syschnames (sys, opt, list, names)
 ## Written by John Ingram August 1996; updated by A. S. Hodel 1998
 
   retsys = syssetsignals(sys,opt,names,list);
--- a/scripts/control/syschnamesl.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/syschnamesl.m	Wed Dec 15 22:28:52 1999 +0000
@@ -27,7 +27,7 @@
 ##  combines the two string lists old_names and inames
 ## @end deftypefn
  
-function old_names = syschnamesl(olist,old_names,inames,listname)
+function old_names = syschnamesl (olist, old_names, inames, listname)
   ## $Revision: 2.1.14.5 $
   ## $Log: syschnamesl.m,v $
   ## Revision 2.1.14.5  1999/09/22  21:55:46  scotte
--- a/scripts/control/syschtsam.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/syschtsam.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,7 @@
 ## an error if sys is purely continuous time.
 ## @end deftypefn
  
-function retsys = syschtsam(sys,tsam)
+function retsys = syschtsam (sys, tsam)
 ## Written by John Ingram August 1996
 
   if (nargin != 2)
--- a/scripts/control/sysconnect.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysconnect.m	Wed Dec 15 22:28:52 1999 +0000
@@ -63,7 +63,7 @@
 ## 
 ## @end deftypefn
 
-function sys = sysconnect(sys,output_list,input_list,order,tol)
+function sys = sysconnect (sys, output_list, input_list, order, tol)
 
   ## A. S. Hodel August 1995
   ## modified by John Ingram July 1996
--- a/scripts/control/syscont.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/syscont.m	Wed Dec 15 22:28:52 1999 +0000
@@ -36,7 +36,7 @@
 ## 
 ## @end deftypefn
  
-function [csys,Acd,Ccd] = syscont(sys)
+function [csys, Acd, Ccd] = syscont (sys)
 
   ## Written by John Ingram August 1996
 
--- a/scripts/control/syscont_disc.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/syscont_disc.m	Wed Dec 15 22:28:52 1999 +0000
@@ -39,7 +39,7 @@
 ## 
 ## @end deftypefn
  
-function [n_tot,st_c,st_d,y_c,y_d] = syscont_disc(sys)
+function [n_tot, st_c, st_d, y_c, y_d] = syscont_disc (sys)
 
   ## Written by A. S. Hodel (a.s.hodel@eng.auburn.edu) Feb 1997
 
--- a/scripts/control/sysdefioname.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysdefioname.m	Wed Dec 15 22:28:52 1999 +0000
@@ -36,7 +36,7 @@
 ## @end example
 ## @end deftypefn
  
-function ioname = sysdefioname(n,str,m)
+function ioname = sysdefioname (n, str, m)
 
   if (nargin < 2 | nargin > 3)
     usage("ioname = sysdefioname(n,str[,m])");
--- a/scripts/control/sysdefstname.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysdefstname.m	Wed Dec 15 22:28:52 1999 +0000
@@ -23,7 +23,7 @@
 ##  used internally, minimal argument checking
 ## @end deftypefn
 
-function stname = sysdefstname(n,nz)
+function stname = sysdefstname (n, nz)
 
   stname = list();
   if(n > 0)
--- a/scripts/control/sysdimensions.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysdimensions.m	Wed Dec 15 22:28:52 1999 +0000
@@ -66,7 +66,7 @@
 
 ## See also: sysgetsignals, sysgettsam
 
-function [n,nz,m,p,yd] = sysdimensions(sys,opt)
+function [n, nz, m, p, yd] = sysdimensions (sys, opt)
 if(nargout > 5 | nargin < 1 | nargin > 2)
   usage("[n,nz,m,p[,yd]] = sysdimensions(sys{,opt})");
 elseif(!is_struct(sys))
--- a/scripts/control/sysdisc.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysdisc.m	Wed Dec 15 22:28:52 1999 +0000
@@ -34,7 +34,7 @@
 ## 
 ## @end deftypefn
  
-function [dsys,Adc,Cdc] = sysdisc(sys)
+function [dsys, Adc, Cdc] = sysdisc (sys)
 
   ## function [dsys,Adc,Cdc] = sysdisc(sys)
   ## inputs: sys = system data structure
--- a/scripts/control/sysdup.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysdup.m	Wed Dec 15 22:28:52 1999 +0000
@@ -51,7 +51,7 @@
 ## 
 ## @end deftypefn
 
-function retsys = sysdup(Asys,output_list,input_list)
+function retsys = sysdup (Asys, output_list, input_list)
 
   ## A. S. Hodel August 1995
   ## modified by John Ingram July 1996
--- a/scripts/control/sysgetsignals.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysgetsignals.m	Wed Dec 15 22:28:52 1999 +0000
@@ -135,7 +135,7 @@
 ## 
 ## @end deftypefn
 
-function [stname,inname,outname,yd] = sysgetsignals(sys,sigid,signum,strflg)
+function [stname, inname, outname, yd] = sysgetsignals (sys, sigid, signum, strflg)
 
   ## Adapted from ss2sys
 
--- a/scripts/control/sysgettsam.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysgettsam.m	Wed Dec 15 22:28:52 1999 +0000
@@ -16,7 +16,7 @@
 ## along with Octave; see the file COPYING.  If not, write to the Free
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
 
-function T = sysgettsam(sys)
+function T = sysgettsam (sys)
 ## T = sysgettsam(sys)
 ## return the sampling time of the system
 
--- a/scripts/control/sysgettype.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysgettype.m	Wed Dec 15 22:28:52 1999 +0000
@@ -33,7 +33,7 @@
 ## 
 ## @end deftypefn 
 
-function systype = sysgettype(sys)
+function systype = sysgettype (sys)
 
   if(!is_struct(sys))
     error("sysgettype: input sys is not a structure");
--- a/scripts/control/sysgroup.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysgroup.m	Wed Dec 15 22:28:52 1999 +0000
@@ -46,7 +46,7 @@
 ## 
 ## @end deftypefn
  
-function sys = sysgroup(...)
+function sys = sysgroup (...)
 
   ## A. S. Hodel August 1995
   ## modified by John Ingram July 1996
--- a/scripts/control/sysgroupn.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysgroupn.m	Wed Dec 15 22:28:52 1999 +0000
@@ -31,7 +31,7 @@
 ## 
 ## @end deftypefn
  
-function names = sysgroupn(names,kind)
+function names = sysgroupn (names, kind)
 
   ## check for duplicate names
   l = length(names);
--- a/scripts/control/sysidx.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysidx.m	Wed Dec 15 22:28:52 1999 +0000
@@ -19,7 +19,7 @@
 ## Written by A. S. Hodel, a.s.hodel@eng.auburn.edu
 
 
-function idxvec = sysidx(sys,sigtype,signamelist)
+function idxvec = sysidx (sys, sigtype, signamelist)
 
   ## idxvec = sysidx(sys,sigtype,signamelist)
   ## return indices of signals with specified signal names
--- a/scripts/control/sysmin.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysmin.m	Wed Dec 15 22:28:52 1999 +0000
@@ -18,7 +18,7 @@
 ##
 ## Written by A. S. Hodel a.s.hodel@eng.auburn.edu
 
-function [retsys,nc,no,cflg,oflg] = sysmin(sys,flg);
+function [retsys, nc, no, cflg, oflg] = sysmin (sys, flg);
 
   ## [retsys,nc,no] = sysmin(sys{,flg});
   ## return a minimal (or reduced order) system
--- a/scripts/control/sysmult.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysmult.m	Wed Dec 15 22:28:52 1999 +0000
@@ -32,7 +32,7 @@
 ## does not recognize discrete inputs).
 ## @end deftypefn
 
-function sys = sysmult(...)
+function sys = sysmult (...)
 
   ## Written by John Ingram July 1996
   ## updated for variable number of arguments by A. S. Hodel July 1999
--- a/scripts/control/sysout.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysout.m	Wed Dec 15 22:28:52 1999 +0000
@@ -39,7 +39,7 @@
 ## @end table
 ## @end deftypefn
  
-function retsys = sysout(sys,opt)
+function retsys = sysout (sys, opt)
 
   ## Written by A S Hodel: 1995-1996
 
--- a/scripts/control/sysprune.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysprune.m	Wed Dec 15 22:28:52 1999 +0000
@@ -45,7 +45,7 @@
 ## @end deftypefn
 ## 
  
-function sys = sysprune(sys,output_idx,input_idx,state_idx)
+function sys = sysprune (sys, output_idx, input_idx, state_idx)
 
   ## A. S. Hodel August 1995
   ## Updated by John Ingram 7-15-96
--- a/scripts/control/sysreorder.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysreorder.m	Wed Dec 15 22:28:52 1999 +0000
@@ -30,7 +30,7 @@
 ##  desired locations.  
 ## @end deftypefn
  
-function pv = sysreorder(vlen,list)
+function pv = sysreorder (vlen, list)
 
   ## A. S. Hodel, Aug 1995
   
--- a/scripts/control/sysrepdemo.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysrepdemo.m	Wed Dec 15 22:28:52 1999 +0000
@@ -24,7 +24,7 @@
 ## Octave Controls toolbox demo: System representation
 ## Written by A. S. Hodel June 1995
 ## Revised Aug 1995 for system data structure format
-function sysrepdemo()
+function sysrepdemo ()
 
 
 
--- a/scripts/control/sysscale.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysscale.m	Wed Dec 15 22:28:52 1999 +0000
@@ -41,7 +41,7 @@
 ## set appropriately in the returned value of @var{sys}.
 ## @end deftypefn
 
-function sys = sysscale(sys,outscale,inscale,outname,inname)
+function sys = sysscale (sys, outscale, inscale, outname, inname)
 
   ## A. S. Hodel August 1995
   ## modified by John Ingram 7-15-96
--- a/scripts/control/syssetsignals.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/syssetsignals.m	Wed Dec 15 22:28:52 1999 +0000
@@ -86,7 +86,7 @@
 ## 
 ## @end deftypefn
 
-function retsys = syssetsignals(sys,opt,names,sig_idx)
+function retsys = syssetsignals (sys, opt, names, sig_idx)
 
   ## Written by John Ingram August 1996
 
--- a/scripts/control/syssub.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/syssub.m	Wed Dec 15 22:28:52 1999 +0000
@@ -36,7 +36,7 @@
 ## @end example
 ## @end deftypefn
  
-function sys = syssub(...)
+function sys = syssub (...)
 
   ## Written by John Ingram July 1996
   ## updated for variable numbers of input arguments by July 1999 A. S. Hodel
--- a/scripts/control/sysupdate.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/sysupdate.m	Wed Dec 15 22:28:52 1999 +0000
@@ -48,7 +48,7 @@
 
 ## See also: tf2sys, ss2sys, zp2sys, sysout, sys2ss, sys2tf, sys2zp
 
-function sys = sysupdate(sys,opt)
+function sys = sysupdate (sys, opt)
 
   ## Written by John Ingram  7-9-96
 
--- a/scripts/control/tf2ss.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/tf2ss.m	Wed Dec 15 22:28:52 1999 +0000
@@ -42,7 +42,7 @@
 ## @end format
 ## @end deftypefn
 
-function [a,b,c,d] = tf2ss(num,den)
+function [a, b, c, d] = tf2ss (num, den)
   ## Written by R. Bruce Tenison (June 22, 1994) btenison@eng.auburn.edu
   ## mod A S Hodel July, Aug  1995
 
--- a/scripts/control/tf2sys.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/tf2sys.m	Wed Dec 15 22:28:52 1999 +0000
@@ -50,7 +50,7 @@
 ## @end example
 ## @end deftypefn
 
-function outsys = tf2sys(num,den,tsam,inname,outname)
+function outsys = tf2sys (num, den, tsam, inname, outname)
   ## Written by R. Bruce Tenison  July 29, 1994
   ## Name changed to TF2SYS July 1995
   ## updated for new system data structure format July 1996
--- a/scripts/control/tf2sysl.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/tf2sysl.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,7 @@
 ##  strip leading zero coefficients to get the true polynomial length
 ## @end deftypefn
 
-function vec = tf2sysl(vec)
+function vec = tf2sysl (vec)
 ## vec = tf2sysl(vec)
 ##
 ## used internally in tf2sys
--- a/scripts/control/tf2zp.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/tf2zp.m	Wed Dec 15 22:28:52 1999 +0000
@@ -28,7 +28,7 @@
 ## @end format
 ## @end deftypefn
 
-function [zer,pol,k] = tf2zp(num,den)
+function [zer, pol, k] = tf2zp (num, den)
 ## Written by A. S. Hodel, etc.
 
   if(nargin == 2)
--- a/scripts/control/tfout.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/tfout.m	Wed Dec 15 22:28:52 1999 +0000
@@ -25,7 +25,7 @@
 ##  See also: polyval, polyvalm, poly, roots, conv, deconv, residue, 
 ##	filter, polyderiv, polyinteg, polyout
 
-function tfout(num,denom,x)
+function tfout (num, denom, x)
 ## Written by A. Scottedward Hodel (scotte@eng.auburn.edu) June 1995)
   
   save_empty = empty_list_elements_ok;
--- a/scripts/control/tzero.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/tzero.m	Wed Dec 15 22:28:52 1999 +0000
@@ -47,7 +47,7 @@
 ## @end deftypefn
 
 
-function [zer, gain] = tzero(A,B,C,D)
+function [zer, gain] = tzero (A, B, C, D)
 
   ## R. Bruce Tenison July 4, 1994
   ## A. S. Hodel Aug 1995: allow for MIMO and system data structures
--- a/scripts/control/ugain.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/ugain.m	Wed Dec 15 22:28:52 1999 +0000
@@ -28,7 +28,7 @@
 ## 
 ## @end deftypefn
 
-function outsys = ugain(n)
+function outsys = ugain (n)
 
   ## Written by Kai P. Mueller April, 1998
   ## Updates
--- a/scripts/control/unpacksys.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/unpacksys.m	Wed Dec 15 22:28:52 1999 +0000
@@ -16,7 +16,7 @@
 ## along with Octave; see the file COPYING.  If not, write to the Free 
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 
  
-function [a,b,c,d] = unpacksys(syst)
+function [a, b, c, d] = unpacksys (syst)
 
   ## [a,b,c,d] = unpacksys(sys)
   ## Obsolete.  Use sys2ss instead.
--- a/scripts/control/wgt1o.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/wgt1o.m	Wed Dec 15 22:28:52 1999 +0000
@@ -31,7 +31,7 @@
 ##  fc = Corner frequency (in Hz, *not* in rad/sec)
 ## @end deftypefn
  
-function wsys = wgt1o(vl, vh, fc)
+function wsys = wgt1o (vl, vh, fc)
 ## Written by Kai P. Mueller September 30, 1997
 
   if (nargin != 3)
--- a/scripts/control/zgfmul.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zgfmul.m	Wed Dec 15 22:28:52 1999 +0000
@@ -28,7 +28,7 @@
 ## ZGEP: Hodel, "Computation of Zeros with Balancing," 1992, submitted to  LAA
 ## Generalized CG: Golub and Van Loan, "Matrix Computations, 2nd ed" 1989
 
-function y = zgfmul(a,b,c,d,x)
+function y = zgfmul (a, b, c, d, x)
 
   ## A. S. Hodel July 24 1992
   ## Conversion to Octave July 3, 1994
--- a/scripts/control/zgfslv.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zgfslv.m	Wed Dec 15 22:28:52 1999 +0000
@@ -21,7 +21,7 @@
 ## solve system of equations for dense zgep problem
 ## @end deftypefn
  
-function x = zgfslv(n,m,p,b)
+function x = zgfslv (n, m, p, b)
   ## Written by A. Scotte Hodel
   ## Converted to Octave by R Bruce Tenison, July 3, 1994
 
--- a/scripts/control/zginit.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zginit.m	Wed Dec 15 22:28:52 1999 +0000
@@ -29,7 +29,7 @@
 ## ZGEP: Hodel, "Computation of Zeros with Balancing," 1992, submitted to  LAA
 ## Generalized CG: Golub and Van Loan, "Matrix Computations, 2nd ed" 1989
 
-function zz = zginit(a,b,c,d)
+function zz = zginit (a, b, c, d)
 
   ## A. S. Hodel July 24 1992
   ## Conversion to Octave by R. Bruce Tenison, July 3, 1994
--- a/scripts/control/zgpbal.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zgpbal.m	Wed Dec 15 22:28:52 1999 +0000
@@ -17,7 +17,7 @@
 ## Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. 
 
 ## -*- texinfo -*-
-## @deftypefn {Function File } {[retsys] =} zgpbal(Asys)
+## @deftypefn {Function File } {retsys =} zgpbal(Asys)
 ##
 ## used internally in @code{tzero}; minimal argument checking performed
 ##
@@ -38,7 +38,8 @@
 ## ZGEP: Hodel, "Computation of Zeros with Balancing," 1992, submitted to  LAA
 ## Generalized CG: Golub and Van Loan, "Matrix Computations, 2nd ed" 1989
 
-function [retsys] = zgpbal(Asys)  
+function retsys = zgpbal (Asys)  
+
   ## A. S. Hodel July 24 1992
   ## Conversion to Octave by R. Bruce Tenison July 3, 1994
 
--- a/scripts/control/zgreduce.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zgreduce.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,7 @@
 ## Automatica, # 1982).
 ## @end deftypefn
  
-function retsys = zgreduce(Asys,meps)
+function retsys = zgreduce (Asys, meps)
 
   ## SYS_INTERNAL accesses members of system data structure
 
--- a/scripts/control/zgrownorm.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zgrownorm.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,7 @@
 ##         @var{zer} = number of rows of mat whose two norm is less than meps
 ## @end deftypefn
 
-function [sig, tau] = zgrownorm(mat,meps)
+function [sig, tau] = zgrownorm (mat, meps)
 
   rownorm = [];
   for ii=1:rows(mat)
--- a/scripts/control/zgscal.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zgscal.m	Wed Dec 15 22:28:52 1999 +0000
@@ -28,7 +28,7 @@
 ## ZGEP: Hodel, "Computation of Zeros with Balancing," 1992, submitted to  LAA
 ## Generalized CG: Golub and Van Loan, "Matrix Computations, 2nd ed" 1989
 
-function x = zgscal(a,b,c,d,z,n,m,p)
+function x = zgscal (a, b, c, d, z, n, m, p)
 
   ## A. S. Hodel July 24 1992
   ## Conversion to Octave R. Bruce Tenison July 3, 1994
--- a/scripts/control/zgsgiv.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zgsgiv.m	Wed Dec 15 22:28:52 1999 +0000
@@ -22,7 +22,8 @@
 ## No longer used in zero-balancing (zgpbal); kept for backward compatibility
 ## @end deftypefn
 
-function [a,b] = zgsgiv(c,s,a,b)
+function [a, b] = zgsgiv (c, s, a, b)
+
   ## A. S. Hodel July 29, 1992
   ## Convertion to Octave by R. Bruce Tenison July 3, 1994
 
--- a/scripts/control/zgshsr.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zgshsr.m	Wed Dec 15 22:28:52 1999 +0000
@@ -23,7 +23,8 @@
 ## Called by zgfslv
 ## @end deftypefn
 
-function x = zgshsr(y)
+function x = zgshsr (y)
+
   ## A. S. Hodel July 24, 1992
   ## Conversion to Octave by R. Bruce Tenison July 3, 1994
 
--- a/scripts/control/zp2ss.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zp2ss.m	Wed Dec 15 22:28:52 1999 +0000
@@ -45,7 +45,7 @@
 ## @samp{k} is @code{zp}-form leading coefficient.
 ## @end deftypefn
  
-function [a,b,c,d] = zp2ss(zer,pol,k)
+function [a, b, c, d] = zp2ss (zer, pol, k)
 
   ## Written by David Clem August 15, 1994
 
--- a/scripts/control/zp2ssg2.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zp2ssg2.m	Wed Dec 15 22:28:52 1999 +0000
@@ -23,7 +23,7 @@
 ##  a polynomial with those roots.
 ## @end deftypefn
 
-function [poly,rvals] = zp2ssg2(rvals)
+function [poly, rvals] = zp2ssg2 (rvals)
 
   ## A. S. Hodel Aug 1996
 
--- a/scripts/control/zp2sys.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zp2sys.m	Wed Dec 15 22:28:52 1999 +0000
@@ -52,7 +52,7 @@
 ## @end example
 ## @end deftypefn
  
-function  outsys = zp2sys (zer,pol,k,tsam,inname,outname)
+function outsys = zp2sys (zer, pol, k, tsam, inname, outname)
 
   ## Modified by John Ingram  July 20, 1996  
 
--- a/scripts/control/zp2tf.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zp2tf.m	Wed Dec 15 22:28:52 1999 +0000
@@ -31,14 +31,13 @@
 ## @code{num/den} from the vectors of poles and zeros.
 ## @end deftypefn
 
-function [num,den] = zp2tf(zer,pol,k)
+function [num, den] = zp2tf (zer, pol, k)
 
   ## Find out whether data was entered as a row or a column vector and
   ## convert to a column vector if necessary
   ## Written by A. S. Hodel with help from students Ingram, McGowan.
   ## a.s.hodel@eng.auburn.edu
 
-
   [rp,cp] = size(pol);
   [rz,cz] = size(zer);
 
--- a/scripts/control/zpout.m	Wed Dec 15 21:59:42 1999 +0000
+++ b/scripts/control/zpout.m	Wed Dec 15 22:28:52 1999 +0000
@@ -25,7 +25,7 @@
 ##  See also: polyval, polyvalm, poly, roots, conv, deconv, residue, 
 ##	filter, polyderiv, polyinteg, polyout 
 
-function zpout(zer,pol,k,x)
+function zpout (zer, pol, k, x)
 
   ## Written by A. Scottedward Hodel (scotte@eng.auburn.edu) June 1995)