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.3 2008/02/26 20:18:19 adrien Exp $ HISTORY: 22-01-2008 A Grynagier Creation 02-01-2008 A Grynagier TO DO : 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.3 2008/02/26 20:18:19 adrien Exp $ 0015 % 0016 % HISTORY: 22-01-2008 A Grynagier 0017 % Creation 02-01-2008 A Grynagier 0018 % 0019 % TO DO : syntaxic tests for making a plist system out of a pzmodel 0020 % 0021 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0022 ALGONAME = mfilename; 0023 VERSION = '$Id: utp_ltpda_ss_make.m,v 1.3 2008/02/26 20:18:19 adrien Exp $'; 0024 CATEGORY = 'STATESPACE'; 0025 display(['starting ' ALGONAME]); 0026 0027 if length(varargin) >0 0028 if isequal( varargin{1}, 'Version') 0029 varargout = VERSION; 0030 return; 0031 elseif isequal(varargin{1}, 'Params') 0032 varargout = plist(); 0033 return; 0034 elseif isequal(varargin{1}, 'Category') 0035 varargout = CATEGORY; 0036 return; 0037 end 0038 end 0039 result = 1; 0040 try 0041 % out of a iir 0042 display('iir part') 0043 f = miir(plist('type', 'bandpass','fs', 1000,'fc', [50 100],'order', 3,'gain',2,'ripple',0.7)); 0044 syst1 = ltpda_ss_make(f); 0045 0046 % out of a pz model 0047 display('pz part') 0048 pzm = pzmodel(1,pole(2/2/pi,1) , [zero(-1/2/pi) zero(-2/2/pi) ]); 0049 syst2 = ltpda_ss_make(pzm); 0050 0051 % out of a file 0052 display('file part') 0053 fname = 'System_Noise_TM'; 0054 syst3 = ltpda_ss_make(fname); 0055 0056 sys4 = ltpda_ss_make(f, pzm, fname, f); 0057 catch 0058 result = 0; 0059 end 0060 0061 display(result) 0062 varargout = {result}; 0063 end