Home > m > timetools > statespacefunctions > utp_ltpda_ss_tomiir.m

utp_ltpda_ss_tomiir

PURPOSE ^

make is the generic function to decalre or load a subsystem.

SYNOPSIS ^

function result = utp_ltpda_ss_tomiir(varargin)

DESCRIPTION ^

 make is the generic function to decalre or load a subsystem.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: tests ltpda_ss_tomiir

 CALL: 

 INPUTS: 

 OUTPUTS: 1/0

 ***** THERE ARE NO DEFAULT PARAMETERS *****

 VERSION: $Id: utp_ltpda_ss_tomiir.html,v 1.1 2008/03/01 12:29:32 hewitson Exp $

 HISTORY: 22-01-2008 A Grynagier
 Creation 02-01-2008 A Grynagier

 TO DO: add numerical check
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function result = utp_ltpda_ss_tomiir(varargin)
0002 % make is the generic function to decalre or load a subsystem.
0003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0004 %
0005 % DESCRIPTION: tests ltpda_ss_tomiir
0006 %
0007 % CALL:
0008 %
0009 % INPUTS:
0010 %
0011 % OUTPUTS: 1/0
0012 %
0013 % ***** THERE ARE NO DEFAULT PARAMETERS *****
0014 %
0015 % VERSION: $Id: utp_ltpda_ss_tomiir.html,v 1.1 2008/03/01 12:29:32 hewitson Exp $
0016 %
0017 % HISTORY: 22-01-2008 A Grynagier
0018 % Creation 02-01-2008 A Grynagier
0019 %
0020 % TO DO: add numerical check
0021 %
0022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0023 ALGONAME = mfilename;
0024 VERSION = '$Id: utp_ltpda_ss_tomiir.html,v 1.1 2008/03/01 12:29:32 hewitson Exp $';
0025 display(['starting ' mfilename]);
0026 
0027 result = 1;
0028 
0029 for i0 = 1:100
0030     %% makes random data
0031     nSysTot = floor(rand()*4)+1;
0032     pSys = floor(rand()*nSysTot)+1;
0033     nUTot = floor(rand()*nSysTot)+1;
0034     OutputSizes = floor(rand(nSysTot,1)*5);
0035     InputSizes = floor(rand(nUTot,1)*5);
0036 
0037     syst = utp_ltpda_ss_random_generate(nSysTot, pSys, nUTot, OutputSizes, InputSizes);
0038 
0039     %% retrieving data
0040     Names = find(syst,'NAME');
0041     Timestep = find(syst,'TIMESTEP');
0042     Xini = find(syst,'XINI');
0043     AMat = find(syst,'AMAT');
0044     BMats = find(syst,'BMATS');
0045     CMat = find(syst,'CMAT');
0046     DMats = find(syst,'DMATS');
0047     % parametric data
0048     ParamNames = find(syst,'PARAMNAMES');
0049     ParamValue = find(syst,'PARAMVALUES');
0050     ParamSigma = find(syst,'PARAMSIGMAS');
0051     NbParam = length(ParamNames);
0052     % input data
0053     InputNames = find(syst,'INPUTNAMES');
0054     InputSizes = find(syst,'INPUTSIZES');
0055     IsUsed = find(syst,'INPUTISUSED');
0056     NbInputs = length(InputNames);
0057     % output data
0058     XIsOutput = find(syst,'XISOUTPUT');
0059     YIsOutput = find(syst,'YISOUTPUT');
0060 
0061     %% launching function
0062     try
0063         iir = ltpda_ss_tomiir(syst);
0064         display('OK')
0065     catch
0066         result = 0;
0067         display('pb')
0068     end
0069 
0070 end
0071 display(result)
0072 
0073 
0074 
0075 end
0076

Generated on Fri 22-Feb-2008 23:32:26 by m2html © 2003