44
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % UTP_MFIR_SAVE a set of UTPs for the mfir/save method
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 % M Hewitson 06-08-08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 % $Id: utp_mfir_save.m,v 1.7 2010/08/31 09:43:48 hewitson Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % <MethodDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 % The save method of the mfir class saves a mfir object to disk. Save stores
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % the variables in a MATLAB formatted file (MAT-file) named filename.mat or in a
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 % XML fromat named filename.xml
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 % </MethodDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 function results = utp_mfir_save(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 % Check the inputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 if nargin == 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 % Some keywords
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 class = 'mfir';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 mthd = 'save';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 results = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 disp(['**** Running UTPs for ' class '/' mthd]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 % Test MFIR objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 [firhp,firlp,firbp,firbr,firpzm,firao,firv,firm] = get_test_objects_mfir;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 % Exception list for the UTPs:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 [ple1,ple2,ple3,ple4,ple5,ple6] = get_test_ples();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 % Run the tests
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 results = [results utp_01]; % getInfo call
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 results = [results utp_02]; % Vector input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 results = [results utp_03]; % Matrix input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 results = [results utp_04]; % List input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 results = [results utp_05]; % Test with mixed input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 results = [results utp_06]; % Test history is working
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 results = [results utp_07]; % Test the modify call works
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 results = [results utp_08]; % Test plist contains the filename
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 results = [results utp_09]; % Test with standard MFIR objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 results = [results utp_10]; % Test MFIR which is build from a pzmodel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 results = [results utp_11]; % Test MFIR which is build from a AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 disp('Done.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 elseif nargin == 1 % Check for UTP functions
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 if strcmp(varargin{1}, 'isutp')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 results = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 results = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 error('### Incorrect inputs')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 %% UTP_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 % Tests that the getInfo call works for this method.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 function result = utp_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 % Test that the getInfo call works for no sets, all sets, and each set
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 % individually.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 % Call for no sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 io(1) = eval([class '.getInfo(''' mthd ''', ''None'')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 % Call for all sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 io(2) = eval([class '.getInfo(''' mthd ''')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 % Call for each set
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 for kk=1:numel(io(2).sets)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 io(kk+2) = eval([class '.getInfo(''' mthd ''', ''' io(2).sets{kk} ''')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 % 1) Check that getInfo call returned an minfo object in all cases.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 % 2) Check that all plists have the correct parameters.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 % check we have minfo objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 if isa(io, 'minfo')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 %%% SET 'None'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 if ~isempty(io(1).sets), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 if ~isempty(io(1).plists), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 %%% Check all Sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 if ~any(strcmpi(io(2).sets, 'Default')), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 if numel(io(2).plists) ~= numel(io(2).sets), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 %%%%%%%%%% SET 'Default'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 if io(3).plists.nparams ~= 4, atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 % Check key
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 if ~io(3).plists.isparam('filename'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 if ~io(3).plists.isparam('prefix'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 if ~io(3).plists.isparam('postfix'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 if ~io(3).plists.isparam('individual files'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 % Check default value
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 if ~isequal(io(3).plists.find('filename'), ''), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 if ~isequal(io(3).plists.find('prefix'), ''), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 if ~isequal(io(3).plists.find('postfix'), ''), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 if ~isequal(io(3).plists.find('individual files'), false), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 % Check options
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 if ~isequal(io(3).plists.getOptionsForParam('filename'), {[]}), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 end % END UTP_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 %% UTP_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 % Tests that the save method works with a vector of MFIR objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 function result = utp_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 % Test that the save method works for a vector of MFIR objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 % Test both formats 'xml' and 'mat'.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 save(firv, 'test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 save(firv, 'test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 out1 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 out2 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 % 1) Check that the number of elements in 'out1' and 'out2' are the same
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 % as in 'firv'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 % 2) Check that the loaded objects are the same as the saved objects.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 % 3) The outputs 'out1' and 'out2' must be the same.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 % Check we have the correct number of outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 if ~isequal(size(out1), size(firv)), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 if ~isequal(size(out2), size(firv)), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 % Check each output against the input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 for kk=1:numel(out1)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 if ~eq(firv(kk), out1(kk), ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 if ~eq(firv(kk), out2(kk), ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 delete('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 delete('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 end % END UTP_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 %% UTP_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 % Tests that the save method works with a matrix of MFIR objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 function result = utp_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 % Test that the save method works for a matrix of MFIR objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 % Test both formats 'xml' and 'mat'.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 save(firm, 'test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 save(firm, 'test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 out1 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 out2 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 % 1) Check that the number of elements in 'out1' and 'out2' are the same
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 % as in 'firm'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 % 2) Check that the loaded objects are the same as the saved objects.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 % 3) The outputs 'out1' and 'out2' must be the same.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 % Check we have the correct number of outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 if ~isequal(size(out1), size(firm)), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 if ~isequal(size(out2), size(firm)), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 % Check each output against the input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 for kk=1:numel(out1)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 if ~eq(firm(kk), out1(kk), ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 if ~eq(firm(kk), out2(kk), ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 delete('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 delete('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 end % END UTP_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 %% UTP_04
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 % Tests that the save method works with a list of MFIR objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 function result = utp_04
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 % Test that the save method works for a list of MFIR objects as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 % Test both formats 'xml' and 'mat'.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 save(firhp, firpzm, firbr, 'test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 save(firhp, firpzm, firbr, 'test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 out1 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 out2 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 % 1) Check that the number of elements in 'out1' and 'out2' are the same
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 % as in the list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 % 2) Check that the loaded objects are the same as the saved objects.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 % 3) The outputs 'out1' and 'out2' must be the same.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 firin = [firhp, firpzm, firbr];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 % Check we have the correct number of outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 if numel(out1) ~= 3, atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 if numel(out2) ~= 3, atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 % Check each output against the input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 for kk=1:numel(out1)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 if ~eq(firin(kk), out1(kk), ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310 if ~eq(firin(kk), out2(kk), ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315 delete('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 delete('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 end % END UTP_04
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325 %% UTP_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 % Tests that the save method works with a mix of different shaped MFIR objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 % as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 function result = utp_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 % Test that the save method works with an input of matrices and vectors
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 % and single MFIR objects. Test both formats 'xml' and 'mat'.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 save(firhp,firv,firpzm, 'test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 save(firhp,firv,firpzm, 'test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 out1 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 out2 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 % 1) Check that the number of elements in 'out' is the same as in
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 % input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 % 2) Check that each output MFIR object contains the correct data.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 firin = [firhp, reshape(firv, 1, []), firpzm];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 % Check we have the correct number of outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 if numel(out1) ~= 2+numel(firv), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369 if numel(out2) ~= 2+numel(firv), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 % Check each output against the input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371 for kk=1:numel(out1)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372 if ~eq(firin(kk), out1(kk), ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 if ~eq(firin(kk), out2(kk), ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 delete('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379 delete('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386 end % END UTP_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 %% UTP_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392 % Tests that the save method properly applies history.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395 function result = utp_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399 % Test that the result of applying the save method can be processed back
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 % to an m-file. Do this for both extensions 'mat' and 'xml'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406 out1 = save(firao, 'test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407 out2 = save(firpzm, 'test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408 mout1 = rebuild(out1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409 mout2 = rebuild(out2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419 % 1) Check that the history applies to the output object. Check that
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420 % save doesn't add a history step to the input object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421 % 2) Check that the read object doesn't contain the save + load history steps.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 % 3) Check that the method rebuild produces the same object as 'out'.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
426 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
427 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
428 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
429 % The last history step is the save method
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
430 if strcmp(out1.hist.methodInfo.mname, 'save'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
431 if strcmp(out2.hist.methodInfo.mname, 'save'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
432 if ~eq(out1.hist, firao.hist), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
433 if ~eq(out2.hist, firpzm.hist), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
434 % check the history steps of the read object (load + save)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
435 outr1 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
436 outr2 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
437 if strcmp(outr1.hist.methodInfo.mname, 'mfir'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
438 if strcmp(outr1.hist.inhists.methodInfo.mname, 'save'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
439 if strcmp(outr2.hist.methodInfo.mname, 'mfir'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
440 if strcmp(outr2.hist.inhists.methodInfo.mname, 'save'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
441 % Check the rebuilt object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
442 if ~eq(mout1, out1, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
443 if ~eq(mout2, out2, ple2), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
444 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
445 % delete test file
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
446 delete('test.xml')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
447 delete('test.mat')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
448 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
449 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
450 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
451
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
452 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
453 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
454 end % END UTP_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
455
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
456 %% UTP_07
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
457
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
458 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
459 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
460 % Tests that the save method works with the modify command.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
461 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
462 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
463 function result = utp_07
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
464
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
465 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
466 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
467 % Use the save method with the modifier command.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
468 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
469 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
470
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
471 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
472 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
473 % copy firhp to work with
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
474 fir_mat = mfir(firhp);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
475 fir_mat.save('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
476 fir_xml = mfir(firhp);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
477 fir_xml.save('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
478 out1 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
479 out2 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
480 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
481 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
482 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
483 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
484 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
485 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
486
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
487 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
488 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
489 % 1) Check that the save method applies the history.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
490 % 2) Check the output against the input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
491 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
492 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
493
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
494 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
495 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
496 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
497 % Check that the modified object have the 'save' method as the last
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
498 % history step
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
499 if strcmp(fir_xml.hist.methodInfo.mname, 'save'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
500 if strcmp(fir_mat.hist.methodInfo.mname, 'save'), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
501 % Check the output without the history
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
502 if ~eq(fir_mat, out1, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
503 if ~eq(fir_xml, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
504 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
505 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
506 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
507 delete('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
508 delete('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
509 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
510 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
511 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
512
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
513 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
514 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
515 end % END UTP_07
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
516
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
517 %% UTP_08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
518
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
519 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
520 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
521 % Control the method with a plist.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
522 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
523 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
524 function result = utp_08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
525
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
526 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
527 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
528 % Test that the save method uses the filename which is stored in a plist.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
529 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
530 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
531
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
532 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
533 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
534 pl1 = plist('filename', 'test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
535 pl2 = plist('filename', 'test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
536 save(firbp, pl1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
537 save(firbp, pl2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
538 out1 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
539 out2 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
540 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
541 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
542 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
543 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
544 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
545 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
546
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
547 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
548 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
549 % 1) Check the output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
550 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
551 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
552
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
553 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
554 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
555 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
556 % Check the output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
557 if ~eq(firbp, out1, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
558 if ~eq(firbp, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
559 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
560 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
561 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
562 delete('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
563 delete('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
564 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
565 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
566 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
567
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
568 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
569 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
570 end % END UTP_08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
571
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
572 %% UTP_09
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
573
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
574 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
575 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
576 % Test the save method with standard MFIR objects.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
577 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
578 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
579 function result = utp_09
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
580
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
581 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
582 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
583 % Save all standard MFIR objects with both extensions.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
584 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
585 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
586
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
587 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
588 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
589 save(firhp, 'test_hp.mat'); % highpass
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
590 save(firhp, 'test_hp.xml'); % highpass
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
591 save(firlp, 'test_lp.mat'); % lowpass
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
592 save(firlp, 'test_lp.xml'); % lowpass
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
593 save(firbp, 'test_bp.mat'); % bandpass
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
594 save(firbp, 'test_bp.xml'); % bandpass
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
595 save(firbr, 'test_br.mat'); % bandreject
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
596 save(firbr, 'test_br.xml'); % bandreject
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
597 out1 = mfir('test_hp.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
598 out2 = mfir('test_hp.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
599 out3 = mfir('test_lp.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
600 out4 = mfir('test_lp.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
601 out5 = mfir('test_bp.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
602 out6 = mfir('test_bp.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
603 out7 = mfir('test_br.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
604 out8 = mfir('test_br.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
605 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
606 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
607 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
608 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
609 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
610 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
611
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
612 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
613 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
614 % 1) Check the output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
615 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
616 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
617
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
618 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
619 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
620 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
621 % Check highpass
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
622 if ~eq(firhp, out1, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
623 if ~eq(firhp, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
624 if ~eq(firlp, out3, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
625 if ~eq(firlp, out4, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
626 if ~eq(firbp, out5, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
627 if ~eq(firbp, out6, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
628 if ~eq(firbr, out7, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
629 if ~eq(firbr, out8, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
630 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
631 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
632 if ~eq(out3, out4, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
633 if ~eq(out5, out6, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
634 if ~eq(out7, out8, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
635 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
636 delete('test_hp.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
637 delete('test_hp.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
638 delete('test_lp.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
639 delete('test_lp.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
640 delete('test_bp.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
641 delete('test_bp.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
642 delete('test_br.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
643 delete('test_br.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
644 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
645 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
646 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
647
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
648 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
649 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
650 end % END UTP_09
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
651
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
652 %% UTP_10
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
653
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
654 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
655 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
656 % Test the save method with MFIR object which is created from a pole/zero model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
657 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
658 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
659 function result = utp_10
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
660
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
661 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
662 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
663 % Save MFIR object which is created from a pzmodel.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
664 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
665 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
666
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
667 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
668 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
669 % Create a MFIR object from a pole/zero model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
670 fir = mfir(plist('pzmodel', pzmodel(1,{[1 4], 2}, 3), 'Nsecs', 10, 'fs', 37));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
671 save(fir, 'test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
672 save(fir, 'test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
673 out1 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
674 out2 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
675 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
676 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
677 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
678 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
679 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
680 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
681
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
682 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
683 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
684 % 1) Check the output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
685 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
686 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
687
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
688 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
689 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
690 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
691 % Check the output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
692 if ~eq(fir, out1, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
693 if ~eq(fir, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
694 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
695 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
696 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
697 delete('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
698 delete('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
699 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
700 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
701 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
702
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
703 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
704 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
705 end % END UTP_10
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
706
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
707 %% UTP_11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
708
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
709 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
710 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
711 % Test the save method with MFIR object which is created from an analysis
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
712 % model.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
713 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
714 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
715 function result = utp_11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
716
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
717 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
718 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
719 % Save MFIR object which is created from an analysis model.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
720 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
721 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
722
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
723 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
724 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
725 % Create a MFIR object from an analysis model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
726 aa = ao(plist('fsfcn', '1./(50+f)', 'f', linspace(0, 500, 1000)));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
727 aa.setFs(1000);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
728 fir = mfir(aa);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
729 save(fir, 'test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
730 save(fir, 'test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
731 out1 = mfir('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
732 out2 = mfir('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
733 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
734 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
735 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
736 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
737 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
738 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
739
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
740 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
741 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
742 % 1) Check the output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
743 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
744 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
745
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
746 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
747 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
748 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
749 % Check the output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
750 if ~eq(fir, out1, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
751 if ~eq(fir, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
752 % Compare the outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
753 if ~eq(out1, out2, ple1), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
754 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
755 delete('test.xml');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
756 delete('test.mat');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
757 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
758 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
759 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
760
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
761 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
762 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
763 end % END UTP_11
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
764
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
765 end
|