Mercurial > hg > octave-lyh
changeset 3383:ebf69eb3d07d
[project @ 1999-12-15 21:27:56 by jwe]
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,31 @@ +1999-12-15 John W. Eaton <jwe@bevo.che.wisc.edu> + + * control/zp2sys.m: Don't save and restore implicit_str_to_num_ok. + * control/zpout.m: Ditto. + * control/tfout.m: Ditto. + * control/tf2sys.m: Ditto. + * control/syssub.m: Ditto. + * control/syssetsignals.m: Ditto. + * control/sysout.m: Ditto. + * control/sysmult.m: Ditto. + * control/sysgroup.m: Ditto. + * control/sysdup.m: Ditto. + * control/sysdisc.m: Ditto. + * control/syscont.m: Ditto. + * control/sysconnect.m: Ditto. + * control/sysappend.m: Ditto. + * control/sysadd.m: Ditto. + * control/ss2sys.m: Ditto. + * control/nyquist.m: Ditto. + * control/lqg.m: Ditto. + * control/fir2sys.m: Ditto. + * control/dmr2d.m: Ditto. + * control/dezero.m: Ditto. + * control/d2c.m: Ditto. + * control/c2d.m: Ditto. + * control/bddemo.m: Ditto. + * control/pzmap.m: Ditto. + 1999-12-08 Daniel Calvelo <dcalvelo@pharion.univ-lille2.fr> * signal/spectral_adf.m: Fix typo.
--- a/scripts/control/bddemo.m +++ b/scripts/control/bddemo.m @@ -26,9 +26,7 @@ ## Written by David Clem August 15, 1994 ## Modified by A S Hodel Summer-Fall 1996 - str_sav = implicit_str_to_num_ok; sav_page = page_screen_output; - implicit_str_to_num_ok = 1; page_screen_output = 1; while (1) @@ -538,13 +536,8 @@ disp(" ") disp("Step 1: We've already created systems P and K. Create a sum ") disp("block as follows:") - implicit_str_to_num_ok = "warn"; cmd = "S = ss2sys([],[],[],[1 -1],0,0,0,[],list(""r(t)"",""y(t)""),""e(t)"");"; run_cmd - implicit_str_to_num_ok = 1; - disp("You may avoid the string conversion warning by setting the ") - disp("Octave global variables implicit_str_to_num_ok = 1"); - disp(" "); disp("(You may wish to look at help ss2sys to see what the above does)"); disp("S=") sysout(S)
--- a/scripts/control/c2d.m +++ b/scripts/control/c2d.m @@ -72,9 +72,6 @@ ## October 1993 ## Updated by John Ingram for system data structure August 1996 - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - ## parse input arguments if(nargin < 1 | nargin > 3) usage("dsys=c2d(sys[,T])"); @@ -169,6 +166,4 @@ error(["Bad option=",opt]) endif - implicit_str_to_num_ok = save_val; # restore value - endfunction
--- a/scripts/control/d2c.m +++ b/scripts/control/d2c.m @@ -62,9 +62,6 @@ ## Updated by John Ingram for system data structure August 1996 ## SYS_INTERNAL accesses members of system data structure - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - if( (nargin != 1) & (nargin != 2) ) usage("csys = d2c(sys[,tol]), csys = d2c(sys,opt)"); elseif (!is_struct(sys)) @@ -222,5 +219,4 @@ endfor endif - implicit_str_to_num_ok = save_val; # restore value endfunction
--- a/scripts/control/dezero.m +++ b/scripts/control/dezero.m @@ -36,9 +36,6 @@ usage ("dezero (s)"); elseif (isstr (s)) - save_val = implicit_str_to_num_ok; - implicit_str_to_num_ok = 1; - [nr, nc] = size (s); len = nr * nc; @@ -53,8 +50,6 @@ t = deblank(setstr(s(find(s != 0) ))); endif - implicit_str_to_num_ok = save_val; - else error ("dezero: expecting string argument"); endif
--- a/scripts/control/dmr2d.m +++ b/scripts/control/dmr2d.m @@ -74,9 +74,6 @@ ## Adapted from c2d by a.s.hodel@eng.auburn.edu - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - ## parse input arguments if(nargin != 4 | nargout > 2) usage("[dsys,fidx] = dmr2d (sys, idx, sprefix, Ts2 {,cuflg})"); @@ -258,6 +255,4 @@ ## construct new system and return dsys = ss2sys(da,db,dc,dd,Ts2,0,nz,stname,inname,outname,find(yd == 1)); - implicit_str_to_num_ok = save_val; # restore value - endfunction
--- a/scripts/control/fir2sys.m +++ b/scripts/control/fir2sys.m @@ -74,9 +74,6 @@ ## updated for new system data structure format July 1996 ## adapted from tf2sys july 1996 - save_val = implicit_str_to_num_ok; - implicit_str_to_num_ok = 1; - ## Test for the correct number of input arguments if (nargin < 1 | nargin > 4) usage('sys=fir2sys(num[,tsam,inname,outname])'); @@ -97,5 +94,4 @@ sys = tf2sys(num,den,tsam,inname,outname); - implicit_str_to_num_ok = save_val; endfunction
--- a/scripts/control/lqg.m +++ b/scripts/control/lqg.m @@ -66,9 +66,6 @@ ## Written by A. S. Hodel August 1995; revised for new system format ## August 1996 - sav_val = implicit_str_to_num_ok; - implicit_str_to_num_ok = 1; - if ( (nargin < 5) | (nargin > 6)) usage("[K,Q1,P1,Ee,Er] = lqg(sys,Sigw, Sigv,Q,R{,input_list})"); @@ -147,5 +144,4 @@ K = ss2sys(Ac,Bc,Cc,Dc,tsam,n,nz,stname,inname1,outname1); endif - implicit_str_to_num_ok = sav_val; endfunction
--- a/scripts/control/nyquist.m +++ b/scripts/control/nyquist.m @@ -97,9 +97,6 @@ ## is SISO, andd computes the frequency response. Only the way the ## response is plotted is different between the two functions. - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - ## check number of input arguments given if (nargin < 1 | nargin > 5) usage("[realp,imagp,w] = nyquist(sys[,w,outputs,inputs,atol])"); @@ -206,6 +203,4 @@ imagp=[]; endif - implicit_str_to_num_ok = save_val; # restore value - endfunction
--- a/scripts/control/pzmap.m +++ b/scripts/control/pzmap.m @@ -30,10 +30,8 @@ function [zer,pol]=pzmap(sys) - save_val = implicit_str_to_num_ok; # save for later save_emp = empty_list_elements_ok; - implicit_str_to_num_ok = 1; empty_list_elements_ok = 1; if(nargin != 1) @@ -83,7 +81,6 @@ endif replot - implicit_str_to_num_ok = save_val; # restore value empty_list_elements_ok = save_emp; endfunction
--- a/scripts/control/ss2sys.m +++ b/scripts/control/ss2sys.m @@ -191,9 +191,6 @@ ## Written by John Ingram (ingraje@eng.auburn.edu) July 20, 1996 - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - ## Test for correct number of inputs if ((nargin < 3) | (nargin > 11)) usage("retsys = ss2sys (a,b,c{,d,tsam,n,nz,stname,inname,outname,outlist})"); @@ -293,5 +290,4 @@ endif endif - implicit_str_to_num_ok = save_val; ## restore value endfunction
--- a/scripts/control/sysadd.m +++ b/scripts/control/sysadd.m @@ -44,9 +44,6 @@ ## Written by John Ingram July 1996 ## Updated for variable number of arguments July 1999 A. S. Hodel - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - if(nargin < 1) usage("sysadd: sys = sysysadd(Gsys{,Hsys, ...})"); endif @@ -115,5 +112,6 @@ sys = sysadd(sys,nth(arglist,kk)); endfor endif + endfunction
--- a/scripts/control/sysappend.m +++ b/scripts/control/sysappend.m @@ -78,10 +78,9 @@ ## written by John Ingram August 1996 - sav_implicit_str_to_num_ok = implicit_str_to_num_ok; # save for later sav_empty_list_elements_ok = empty_list_elements_ok; - empty_list_elements_ok = 1; implicit_str_to_num_ok = 1; + empty_list_elements_ok = 1; ## check input arguments if ( (nargin < 2) | (nargin > 7) | (!is_struct(sys))) @@ -187,7 +186,6 @@ ## construct return system retsys = ss2sys(Aa,Ab,Ac,Ad,Ats,Ann,Anz,Ast,Ain,Aout,find(Ayd == 1)); - implicit_str_to_num_ok = sav_implicit_str_to_num_ok; # restore value empty_list_elements_ok = sav_empty_list_elements_ok; endfunction
--- a/scripts/control/sysconnect.m +++ b/scripts/control/sysconnect.m @@ -68,9 +68,6 @@ ## A. S. Hodel August 1995 ## modified by John Ingram July 1996 - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - if( (nargin < 3) | (nargin > 5) ) usage("retsys = sysconnect(sys,output_list,input_list[,order,tol])"); endif @@ -274,6 +271,4 @@ elseif(strcmp(sysgettype(sys),"zp") ) sysupdate(sys,'zp'); endif - implicit_str_to_num_ok = save_val; # restore value - endfunction
--- a/scripts/control/syscont.m +++ b/scripts/control/syscont.m @@ -40,9 +40,8 @@ ## Written by John Ingram August 1996 - save_val = implicit_str_to_num_ok; # save for later save_empty = empty_list_elements_ok; - empty_list_elements_ok = implicit_str_to_num_ok = 1; + empty_list_elements_ok = 1; if (nargin != 1) usage("[csys,Acd,Ccd,Dcd] = syscont(sys)"); @@ -83,7 +82,6 @@ csys = ss2sys(Acc,Bcc,Ccc,Dcc,0,sys_n,0,stname,inname,outname); - implicit_str_to_num_ok = save_val; # restore value empty_list_elements_ok = save_empty; endfunction
--- a/scripts/control/sysdisc.m +++ b/scripts/control/sysdisc.m @@ -45,9 +45,8 @@ ## outputs, respectively. ## - save_val = implicit_str_to_num_ok; # save for later save_empty = empty_list_elements_ok; - empty_list_elements_ok = implicit_str_to_num_ok = 1; + empty_list_elements_ok = 1; if (nargin != 1) @@ -103,7 +102,7 @@ else dsys=[]; endif - implicit_str_to_num_ok = save_val; # restore value + empty_list_elements_ok = save_empty; endfunction
--- a/scripts/control/sysdup.m +++ b/scripts/control/sysdup.m @@ -56,9 +56,6 @@ ## A. S. Hodel August 1995 ## modified by John Ingram July 1996 - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - if( nargin != 3) usage("retsys = sysdup(Asys,output_list,input_list)"); endif @@ -119,6 +116,4 @@ retsys = syssetsignals(retsys,"yd",dflg,jj); endfor - implicit_str_to_num_ok = save_val; # restore value - endfunction
--- a/scripts/control/sysgroup.m +++ b/scripts/control/sysgroup.m @@ -52,9 +52,6 @@ ## modified by John Ingram July 1996 ## A. S. Hodel: modified for variable number of arguments 1999 - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - save_emp = empty_list_elements_ok; empty_list_elements_ok = 1; @@ -149,7 +146,6 @@ endfor endif - implicit_str_to_num_ok = save_val; # restore value empty_list_elements_ok = save_emp; endfunction
--- a/scripts/control/sysmult.m +++ b/scripts/control/sysmult.m @@ -37,9 +37,6 @@ ## Written by John Ingram July 1996 ## updated for variable number of arguments by A. S. Hodel July 1999 - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - if(nargin < 1) usage("sysmult: sys = sysmult(Asys{,Bsys,...})"); endif @@ -111,6 +108,6 @@ sys = sysmult(sys,nth(arglist,kk)); endfor endif - implicit_str_to_num_ok = save_val; # restore value + endfunction
--- a/scripts/control/sysout.m +++ b/scripts/control/sysout.m @@ -43,10 +43,6 @@ ## Written by A S Hodel: 1995-1996 - ## save for restoring at end of routine - save_val = implicit_str_to_num_ok; - implicit_str_to_num_ok = 1; - if( (nargin < 1) || (nargin > 2) ) usage("sysout(sys[,opt])"); endif @@ -150,6 +146,5 @@ endif ## restore global variable - implicit_str_to_num_ok = save_val; endfunction
--- a/scripts/control/syssetsignals.m +++ b/scripts/control/syssetsignals.m @@ -90,9 +90,6 @@ ## Written by John Ingram August 1996 - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - if (nargin < 3 | nargin > 4) usage("retsys=syssetsignals(sys,opt,names{,sig_idx})"); elseif (!is_struct(sys)) @@ -227,6 +224,5 @@ endif retsys = sys; - implicit_str_to_num_ok = save_val; # restore value endfunction
--- a/scripts/control/syssub.m +++ b/scripts/control/syssub.m @@ -41,9 +41,6 @@ ## Written by John Ingram July 1996 ## updated for variable numbers of input arguments by July 1999 A. S. Hodel - save_val = implicit_str_to_num_ok; # save for later - implicit_str_to_num_ok = 1; - if(nargin < 1) usage("syssub: sys = syssub(Gsys{,Hsys,...})"); endif
--- a/scripts/control/tf2sys.m +++ b/scripts/control/tf2sys.m @@ -55,9 +55,6 @@ ## Name changed to TF2SYS July 1995 ## updated for new system data structure format July 1996 - save_val = implicit_str_to_num_ok; - implicit_str_to_num_ok = 1; - ## Test for the correct number of input arguments if ((nargin < 2) || (nargin > 5)) usage('outsys=tf2sys(num,den[,tsam,inname,outname])'); @@ -139,5 +136,4 @@ endif endif - implicit_str_to_num_ok = save_val; endfunction
--- a/scripts/control/tfout.m +++ b/scripts/control/tfout.m @@ -28,9 +28,8 @@ function tfout(num,denom,x) ## Written by A. Scottedward Hodel (scotte@eng.auburn.edu) June 1995) - save_val = implicit_str_to_num_ok; save_empty = empty_list_elements_ok; - empty_list_elements_ok = implicit_str_to_num_ok = 1; + empty_list_elements_ok = 1; if (nargin < 2 ) | (nargin > 3) | (nargout != 0 ) usage("tfout(num,denom[,x])"); @@ -58,6 +57,5 @@ error('tfout: empty transfer function') end - implicit_str_to_num_ok = save_val; empty_list_elements_ok = save_empty; endfunction
--- a/scripts/control/zp2sys.m +++ b/scripts/control/zp2sys.m @@ -56,9 +56,6 @@ ## Modified by John Ingram July 20, 1996 - save_val = implicit_str_to_num_ok; # save for restoring later - implicit_str_to_num_ok = 1; - ## Test for the correct number of input arguments if ((nargin < 3) || (nargin > 6)) usage("outsys = zp2sys(zer,pol,k[,tsam,inname,outname])"); @@ -146,5 +143,4 @@ endif endif - implicit_str_to_num_ok = save_val; endfunction
--- a/scripts/control/zpout.m +++ b/scripts/control/zpout.m @@ -29,12 +29,9 @@ ## Written by A. Scottedward Hodel (scotte@eng.auburn.edu) June 1995) - save_val = implicit_str_to_num_ok; save_empty = empty_list_elements_ok; empty_list_elements_ok = 1; - implicit_str_to_num_ok = 1; - if (nargin < 3 ) | (nargin > 4) | (nargout != 0 ) usage("zpout(zer,pol,k[,x])"); endif @@ -105,7 +102,6 @@ error('zpout: empty transfer function') end - implicit_str_to_num_ok = save_val; empty_list_elements_ok = save_empty; endfunction