FIND overloads find routine for a parameter list. a = find(pl, 'key') returns the value(s) corresponding to all parameters in the list with key 'key'. M Hewitson 02-02-07 $Id: find.html,v 1.1 2007/06/08 14:15:06 hewitson Exp $
0001 function a = find(pl, key) 0002 0003 % FIND overloads find routine for a parameter list. 0004 % 0005 % a = find(pl, 'key') 0006 % 0007 % returns the value(s) corresponding to all parameters in the list with key 0008 % 'key'. 0009 % 0010 % M Hewitson 02-02-07 0011 % 0012 % $Id: find.html,v 1.1 2007/06/08 14:15:06 hewitson Exp $ 0013 % 0014 0015 ps = get(pl, 'params'); 0016 np = length(ps); 0017 a = []; 0018 0019 for i=1:np 0020 p = ps(i); 0021 if strcmp(p.key, key) 0022 a = [a p.val]; 0023 end 0024 end 0025 0026 0027 0028 % END