Mercurial > hg > octave-lyh
changeset 3385:10f21f7ccc7f
[project @ 1999-12-15 22:28:26 by jwe]
line wrap: on
line diff
--- a/scripts/control/DEMOcontrol.m +++ b/scripts/control/DEMOcontrol.m @@ -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 +++ b/scripts/control/abcddims.m @@ -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 +++ b/scripts/control/analdemo.m @@ -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 +++ b/scripts/control/axis2dlim.m @@ -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 +++ b/scripts/control/bddemo.m @@ -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 +++ b/scripts/control/bode.m @@ -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 +++ b/scripts/control/bode_bounds.m @@ -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 +++ b/scripts/control/bodquist.m @@ -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 +++ b/scripts/control/buildssic.m @@ -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 +++ b/scripts/control/com2str.m @@ -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 +++ b/scripts/control/controldemo.m @@ -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 +++ b/scripts/control/ctrb.m @@ -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 +++ b/scripts/control/d2c.m @@ -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 +++ b/scripts/control/damp.m @@ -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 +++ b/scripts/control/dcgain.m @@ -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 +++ b/scripts/control/dgkfdemo.m @@ -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 +++ b/scripts/control/dgram.m @@ -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 +++ b/scripts/control/dlqg.m @@ -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 +++ b/scripts/control/dmr2d.m @@ -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 +++ b/scripts/control/dre.m @@ -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 +++ b/scripts/control/fir2sys.m @@ -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 +++ b/scripts/control/frdemo.m @@ -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 +++ b/scripts/control/freqchkw.m @@ -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 +++ b/scripts/control/freqresp.m @@ -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 +++ b/scripts/control/gram.m @@ -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 +++ b/scripts/control/h2norm.m @@ -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 +++ b/scripts/control/h2syn.m @@ -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 +++ b/scripts/control/hinf_ctr.m @@ -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 +++ b/scripts/control/hinfnorm.m @@ -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 +++ b/scripts/control/hinfsyn.m @@ -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 +++ b/scripts/control/hinfsyn_chk.m @@ -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 +++ b/scripts/control/hinfsyn_ric.m @@ -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 +++ b/scripts/control/impulse.m @@ -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 +++ b/scripts/control/is_abcd.m @@ -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 +++ b/scripts/control/is_controllable.m @@ -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 +++ b/scripts/control/is_detectable.m @@ -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 +++ b/scripts/control/is_dgkf.m @@ -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 +++ b/scripts/control/is_digital.m @@ -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 +++ b/scripts/control/is_observable.m @@ -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 +++ b/scripts/control/is_sample.m @@ -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 +++ b/scripts/control/is_signal_list.m @@ -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 +++ b/scripts/control/is_siso.m @@ -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 +++ b/scripts/control/is_stabilizable.m @@ -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 +++ b/scripts/control/jet707.m @@ -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 +++ b/scripts/control/lqg.m @@ -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 +++ b/scripts/control/lsim.m @@ -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 +++ b/scripts/control/ltifr.m @@ -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 +++ b/scripts/control/minfo.m @@ -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 +++ b/scripts/control/moddemo.m @@ -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 +++ b/scripts/control/nichols.m @@ -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 +++ b/scripts/control/nyquist.m @@ -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 +++ b/scripts/control/obsv.m @@ -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 +++ b/scripts/control/ord2.m @@ -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 +++ b/scripts/control/outlist.m @@ -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 +++ b/scripts/control/packsys.m @@ -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 +++ b/scripts/control/parallel.m @@ -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 +++ b/scripts/control/place.m @@ -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 +++ b/scripts/control/polyout.m @@ -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 +++ b/scripts/control/prompt.m @@ -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 +++ b/scripts/control/pzmap.m @@ -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 +++ b/scripts/control/qzval.m @@ -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 +++ b/scripts/control/rldemo.m @@ -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 +++ b/scripts/control/rlocus.m @@ -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 +++ b/scripts/control/rotg.m @@ -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 +++ b/scripts/control/series.m @@ -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 +++ b/scripts/control/sortcom.m @@ -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 +++ b/scripts/control/ss2sys.m @@ -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 +++ b/scripts/control/ss2tf.m @@ -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 +++ b/scripts/control/ss2zp.m @@ -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 +++ b/scripts/control/starp.m @@ -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 +++ b/scripts/control/step.m @@ -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 +++ b/scripts/control/stepimp.m @@ -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 +++ b/scripts/control/strappend.m @@ -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 +++ b/scripts/control/susball.m @@ -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 +++ b/scripts/control/swap.m @@ -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 +++ b/scripts/control/swapcols.m @@ -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 +++ b/scripts/control/swaprows.m @@ -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 +++ b/scripts/control/sys2fir.m @@ -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 +++ b/scripts/control/sys2ss.m @@ -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 +++ b/scripts/control/sys2tf.m @@ -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 +++ b/scripts/control/sys2zp.m @@ -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 +++ b/scripts/control/sysadd.m @@ -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 +++ b/scripts/control/sysappend.m @@ -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 +++ b/scripts/control/syschnames.m @@ -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 +++ b/scripts/control/syschnamesl.m @@ -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 +++ b/scripts/control/syschtsam.m @@ -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 +++ b/scripts/control/sysconnect.m @@ -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 +++ b/scripts/control/syscont.m @@ -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 +++ b/scripts/control/syscont_disc.m @@ -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 +++ b/scripts/control/sysdefioname.m @@ -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 +++ b/scripts/control/sysdefstname.m @@ -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 +++ b/scripts/control/sysdimensions.m @@ -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 +++ b/scripts/control/sysdisc.m @@ -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 +++ b/scripts/control/sysdup.m @@ -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 +++ b/scripts/control/sysgetsignals.m @@ -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 +++ b/scripts/control/sysgettsam.m @@ -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 +++ b/scripts/control/sysgettype.m @@ -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 +++ b/scripts/control/sysgroup.m @@ -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 +++ b/scripts/control/sysgroupn.m @@ -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 +++ b/scripts/control/sysidx.m @@ -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 +++ b/scripts/control/sysmin.m @@ -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 +++ b/scripts/control/sysmult.m @@ -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 +++ b/scripts/control/sysout.m @@ -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 +++ b/scripts/control/sysprune.m @@ -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 +++ b/scripts/control/sysreorder.m @@ -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 +++ b/scripts/control/sysrepdemo.m @@ -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 +++ b/scripts/control/sysscale.m @@ -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 +++ b/scripts/control/syssetsignals.m @@ -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 +++ b/scripts/control/syssub.m @@ -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 +++ b/scripts/control/sysupdate.m @@ -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 +++ b/scripts/control/tf2ss.m @@ -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 +++ b/scripts/control/tf2sys.m @@ -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 +++ b/scripts/control/tf2sysl.m @@ -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 +++ b/scripts/control/tf2zp.m @@ -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 +++ b/scripts/control/tfout.m @@ -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 +++ b/scripts/control/tzero.m @@ -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 +++ b/scripts/control/ugain.m @@ -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 +++ b/scripts/control/unpacksys.m @@ -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 +++ b/scripts/control/wgt1o.m @@ -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 +++ b/scripts/control/zgfmul.m @@ -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 +++ b/scripts/control/zgfslv.m @@ -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 +++ b/scripts/control/zginit.m @@ -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 +++ b/scripts/control/zgpbal.m @@ -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 +++ b/scripts/control/zgreduce.m @@ -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 +++ b/scripts/control/zgrownorm.m @@ -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 +++ b/scripts/control/zgscal.m @@ -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 +++ b/scripts/control/zgsgiv.m @@ -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 +++ b/scripts/control/zgshsr.m @@ -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 +++ b/scripts/control/zp2ss.m @@ -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 +++ b/scripts/control/zp2ssg2.m @@ -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 +++ b/scripts/control/zp2sys.m @@ -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 +++ b/scripts/control/zp2tf.m @@ -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 +++ b/scripts/control/zpout.m @@ -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)