


ISPARAM look for a given key in the parameter list.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: ISPARAM look for a given key in the parameter list. Exist the key
in the parameter list then is the result 1 otherwise 0.
CALL: res = isparam(pl, 'key')
VERSION: $Id: isparam.m,v 1.2 2007/11/23 15:34:47 ingo Exp $
HISTORY: 07-11-2007 Diepholz
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0001 function res = isparam(pl, key) 0002 % ISPARAM look for a given key in the parameter list. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: ISPARAM look for a given key in the parameter list. Exist the key 0007 % in the parameter list then is the result 1 otherwise 0. 0008 % 0009 % CALL: res = isparam(pl, 'key') 0010 % 0011 % VERSION: $Id: isparam.m,v 1.2 2007/11/23 15:34:47 ingo Exp $ 0012 % 0013 % HISTORY: 07-11-2007 Diepholz 0014 % Creation 0015 % 0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0017 0018 VERSION = '$Id: isparam.m,v 1.2 2007/11/23 15:34:47 ingo Exp $'; 0019 0020 % Check if this is a call for parameters or for the cvs-version number 0021 if nargin == 2 0022 if isa(pl, 'plist') && ischar(key) 0023 in = key; 0024 if strcmp(in, 'Params') 0025 res = plist(); 0026 return 0027 elseif strcmp(in, 'Version') 0028 res = VERSION; 0029 return 0030 end 0031 end 0032 end 0033 0034 p = pl.params; 0035 res = 0; 0036 0037 for ii = 1:length(p) 0038 if strcmpi(p(ii).key, key) 0039 res = 1; 0040 return 0041 end 0042 end 0043 0044 0045 0046 % END