44
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % UTP_AO_X a set of UTPs for the ao/x 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_ao_x.m,v 1.3 2009/07/21 15:57:44 ingo 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 x method of the ao class is a get-function to get the x values of the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % data object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 % </MethodDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 function results = utp_ao_x(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % Check the inputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 if nargin == 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 % Some keywords
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 class = 'ao';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 mthd = 'x';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 results = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 disp(['**** Running UTPs for ' class '/' mthd]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 % Test AOs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 [at1,at2,at3,at4,at5,at6,atvec,atmat] = eval(['get_test_objects_' class]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 % Exception list for the UTPs:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 [ple1,ple2,ple3,ple4,ple5,ple6] = get_test_ples();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 % Run the tests
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 results = [results utp_01]; % getInfo call
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 results = [results utp_02]; % Vector input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 results = [results utp_03]; % Matrix input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 results = [results utp_04]; % List input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 results = [results utp_05]; % Test with mixed input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 results = [results utp_06]; % Test history is working
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 results = [results utp_07]; % Test with all data objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 results = [results utp_08]; % Test with additional plist with the key 'axis'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 disp('Done.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 disp('******************************************************');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 elseif nargin == 1 % Check for UTP functions
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 if strcmp(varargin{1}, 'isutp')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 results = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 results = 0;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 error('### Incorrect inputs')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 %% UTP_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 % Tests that the getInfo call works for this method.
|
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 function result = utp_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 % Test that the getInfo call works for no sets, all sets, and each set
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 % individually.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 % Call for no sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 io(1) = eval([class '.getInfo(''' mthd ''', ''None'')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 % Call for all sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 io(2) = eval([class '.getInfo(''' mthd ''')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 % Call for each set
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 for kk=1:numel(io(2).sets)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 io(kk+2) = eval([class '.getInfo(''' mthd ''', ''' io(2).sets{kk} ''')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 % 1) Check that getInfo call returned an minfo object in all cases.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 % 2) Check that all plists have the correct parameters.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 % check we have minfo objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 if isa(io, 'minfo')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 % SET 'None'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 if ~isempty(io(1).sets), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 if ~isempty(io(1).plists), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 % Check all Sets
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 if ~any(strcmpi(io(2).sets, 'Default')), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 if numel(io(2).plists) ~= numel(io(2).sets), atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 % SET 'Default'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 if io(3).plists.nparams ~= 0, atest = false; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 % Check key
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 % Check default value
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 % Check options
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 end % END UTP_01
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 %% UTP_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 % Tests that the x method works with a vector of AOs as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 function result = utp_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 % The x method doesn't work with a vector of AOs. Nothing to do
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 end % END UTP_02
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 %% UTP_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 % Tests that the x method works with a matrix of AOs as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 function result = utp_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 % The x method doesn't work with a matrix of AOs. Nothing to do
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 end % END UTP_03
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 %% UTP_04
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 % Tests that the x method works with a list of AOs as input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 function result = utp_04
|
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 % The x method doesn't work with a list of AOs. Nothing to do
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 % <SyntaxCode>
|
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 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 end % END UTP_04
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 %% UTP_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 % Tests that the x method works with a mix of different shaped AOs as
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 % input.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 function result = utp_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 % The x method can only return the x values of one AO. Nothing to do
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 end % END UTP_05
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 %% UTP_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 % Tests that the x method properly applies history.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 function result = utp_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 % The x method doesn't change the AO, thus will no history added.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 % Nothing to do
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325 end % END UTP_06
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 %% UTP_07
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 % Tests that the x method works for AOs with different data objects.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 function result = utp_07
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 % Test that the x method returns the x values for AOs with cdata, fsdata,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 % tsdata and xydata objects.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 x1 = at1.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 x2 = at2.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 x3 = at3.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 x4 = at4.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 % 1) Check the output.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 if ~isequal(x1, at1.data.getX), atest = false; end;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 if ~isequal(x2, at2.data.x), atest = false; end;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 if ~isequal(x3, at3.data.x'), atest = false; end;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 if ~isequal(x4, []), atest = false; end;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 end % END UTP_07
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 %% UTP_08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380 % <TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382 % Tests that the x method returns the x values of the data object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 % </TestDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385 function result = utp_08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387 % <SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389 % Test that the x method returns the x values in a column vector independent
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 % form the shape of the values in the data object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392 % </SyntaxDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 try
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395 % <SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396 x1 = at5.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 x2 = at6.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 % </SyntaxCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399 stest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 catch err
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 disp(err.message)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 stest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 % <AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407 % 1) Check that 'x1' and 'x2' are column vectors.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409 % </AlgoDescription>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411 atest = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412 if stest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413 % <AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414 if size(x1, 2) ~= 1, atest = false; end;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 if size(x2, 2) ~= 1, atest = false; end;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416 % </AlgoCode>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418 atest = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421 % Return a result structure
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 result = utp_prepare_result(atest, stest, dbstack, mfilename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423 end % END UTP_08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425 end
|