comparison m-toolbox/test/test_plist_subset.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 clear all;
2
3 pl = plist('a', ao, 'b', 1, 'c', 'something', 'fs', 10, 'cell', {1, 2});
4
5 %% Get a subset by string
6
7 ss = pl.subset('a')
8 ss = pl.subset('a', 'b')
9
10 %% Modify error
11 pl.subset('a')
12
13 %% Use a plist
14
15 ss = pl.subset(plist('keys', {'a', 'cell'}))
16
17 %% Use a cell array
18
19 ss = pl.subset({'a', 'cell'})
20
21 %% Mix
22
23 ss = pl.subset('b', {'a', 'cell'})
24
25 ss = pl.subset('b', plist('keys', {'a', 'cell'}), {'a', 'fs'})
26
27 %% Check for missing keys
28
29 ss = pl.subset({'a', 'foo', 'bob'})