tests utp_ltpda_ss_make %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: tests utp_ltpda_ss_make. Numerical tests are done for the subfunction. Only syntaxic tests here. CALL: utp_ltpda_ss_make INPUTS: 1/0 ***** THERE ARE NO DEFAULT PARAMETERS ***** VERSION: $Id: utp_ltpda_ss_make.m,v 1.4 2008/03/11 16:52:56 adrien Exp $ HISTORY: 22-01-2008 A Grynagier Creation 02-01-2008 A Grynagier TO DO : check if history is correctly used syntaxic tests for making a plist system out of a pzmodel %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function varargout = utp_ltpda_ss_make(varargin) 0002 % tests utp_ltpda_ss_make 0003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0004 % 0005 % DESCRIPTION: tests utp_ltpda_ss_make. Numerical tests are done for 0006 % the subfunction. Only syntaxic tests here. 0007 % 0008 % CALL: utp_ltpda_ss_make 0009 % 0010 % INPUTS: 1/0 0011 % 0012 % ***** THERE ARE NO DEFAULT PARAMETERS ***** 0013 % 0014 % VERSION: $Id: utp_ltpda_ss_make.m,v 1.4 2008/03/11 16:52:56 adrien Exp $ 0015 % 0016 % HISTORY: 22-01-2008 A Grynagier 0017 % Creation 02-01-2008 A Grynagier 0018 % 0019 % TO DO : check if history is correctly used 0020 % syntaxic tests for making a plist system out of a pzmodel 0021 % 0022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0023 ALGONAME = mfilename; 0024 VERSION = '$Id: utp_ltpda_ss_make.m,v 1.4 2008/03/11 16:52:56 adrien Exp $'; 0025 CATEGORY = 'STATESPACE'; 0026 display(['starting ' ALGONAME]); 0027 0028 if not(isempty(varargin)) 0029 if isequal( varargin{1}, 'Version') 0030 varargout = VERSION; 0031 return; 0032 elseif isequal(varargin{1}, 'Params') 0033 varargout = plist(); 0034 return; 0035 elseif isequal(varargin{1}, 'Category') 0036 varargout = CATEGORY; 0037 return; 0038 end 0039 end 0040 result = 1; 0041 try 0042 % out of a iir 0043 display('iir part') 0044 f = miir(plist('type', 'bandpass','fs', 1000,'fc', [50 100],'order', 3,'gain',2,'ripple',0.7)); 0045 syst1 = ltpda_ss_make(f); 0046 0047 % out of a pz model 0048 display('pz part') 0049 pzm = pzmodel(1,pole(2/2/pi,1) , [zero(-1/2/pi) zero(-2/2/pi) ]); 0050 syst2 = ltpda_ss_make(pzm); 0051 0052 % out of a file 0053 display('file part') 0054 fname = 'System_Noise_TM'; 0055 syst3 = ltpda_ss_make(fname); 0056 0057 sys4 = ltpda_ss_make(f, pzm, fname, f); 0058 catch 0059 result = 0; 0060 end 0061 0062 display(result) 0063 varargout = {result}; 0064 end