Mercurial > hg > ltpda
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/test/test_plist_subset.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,29 @@ +clear all; + +pl = plist('a', ao, 'b', 1, 'c', 'something', 'fs', 10, 'cell', {1, 2}); + +%% Get a subset by string + +ss = pl.subset('a') +ss = pl.subset('a', 'b') + +%% Modify error +pl.subset('a') + +%% Use a plist + +ss = pl.subset(plist('keys', {'a', 'cell'})) + +%% Use a cell array + +ss = pl.subset({'a', 'cell'}) + +%% Mix + +ss = pl.subset('b', {'a', 'cell'}) + +ss = pl.subset('b', plist('keys', {'a', 'cell'}), {'a', 'fs'}) + +%% Check for missing keys + +ss = pl.subset({'a', 'foo', 'bob'})