


NPARAMS returns the number of param objects in the list.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: NPARAMS returns the number of param objects in the list.
CALL: n = nparams(plist)
VERSION: $Id: nparams.m,v 1.3 2007/12/12 18:45:09 ingo Exp $
HISTORY: 30-01-2007 M Hewitson
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0001 function n = nparams(pl, varargin) 0002 % NPARAMS returns the number of param objects in the list. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: NPARAMS returns the number of param objects in the list. 0007 % 0008 % CALL: n = nparams(plist) 0009 % 0010 % VERSION: $Id: nparams.m,v 1.3 2007/12/12 18:45:09 ingo Exp $ 0011 % 0012 % HISTORY: 30-01-2007 M Hewitson 0013 % Creation 0014 % 0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0016 0017 VERSION = '$Id: nparams.m,v 1.3 2007/12/12 18:45:09 ingo Exp $'; 0018 0019 % Check if this is a call for parameters 0020 if nargin == 2 0021 if isa(pl, 'plist') && ischar(varargin{1}) 0022 in = char(varargin{1}); 0023 if strcmp(in, 'Params') 0024 n = plist; 0025 return 0026 elseif strcmp(in, 'Version') 0027 n = VERSION; 0028 return 0029 end 0030 end 0031 end 0032 0033 n = length(pl.params); 0034 0035 % END