view m-toolbox/test/test_plist_find.m @ 36:5eb86f6881ef database-connection-manager

Remove commented-out code
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

function test_plist_find()

% Test the find function of plist class.
% 
% M Hueller 26-11-09
% 
% $Id: test_plist_find.m,v 1.1 2009/11/26 14:03:48 mauro Exp $
% 

% Make some parameters

p1 = param('a', 1);
p2 = param('b', 2);
p3 = param('c', 3);
p4 = param('a', 4);

% make plists
pl1 = plist([p1 p2]);
pl2 = plist(p3);
pl3 = plist([p2 p4]);

% find with no default
p1_f = find(pl1, 'a')
p2_f = find(pl1, 'b')
p3_f = find(pl1, 'c')

% find with no default
p1_f = find(pl1, 'a', 0)
p2_f = find(pl1, 'b', -7)
p3_f = find(pl1, 'c', 10)
p4_f = find(pl2, 'a', 0)
p5_f = find(pl2, 'b', -7)
p6_f = find(pl2, 'c', 10)
p7_f = find(pl3, 'a', 0)
p8_f = find(pl3, 'b', -7)
p9_f = find(pl3, 'c', 10)


% END