Mercurial > hg > ltpda
comparison m-toolbox/test/test_plist_mfind.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 function test_plist_mfind() | |
2 | |
3 % Test the mfind function of plist class. | |
4 % | |
5 % M Hueller 26-11-09 | |
6 % | |
7 % $Id: test_plist_mfind.m,v 1.1 2009/11/26 14:03:48 mauro Exp $ | |
8 % | |
9 | |
10 % Make some parameters | |
11 | |
12 p1 = param('a', 1); | |
13 p2 = param('b', 2); | |
14 p3 = param('c', 3); | |
15 p4 = param('a', 4); | |
16 | |
17 % make plists | |
18 pl1 = plist([p1 p2]); | |
19 pl2 = plist(p3); | |
20 pl3 = plist([p2 p4]); | |
21 | |
22 % mfind with one argument | |
23 p1_f = mfind(pl1, 'a') | |
24 p2_f = mfind(pl1, 'b') | |
25 p3_f = mfind(pl1, 'c') | |
26 | |
27 % mfind with more than one argument | |
28 p1_f = mfind(pl1, 'a', 'b') | |
29 p2_f = mfind(pl1, 'b', 'c') | |
30 p3_f = mfind(pl1, 'a', 'a') | |
31 p4_f = mfind(pl2, 'a', 'a') | |
32 p5_f = mfind(pl2, 'b', 'a', 'c') | |
33 p6_f = mfind(pl2, 'c') | |
34 p7_f = mfind(pl3, 'a', 'b', 'c') | |
35 p8_f = mfind(pl3, 'b', 'a', 'c') | |
36 p9_f = mfind(pl3, 'b', 'd') | |
37 | |
38 | |
39 | |
40 % END |