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.html,v 1.14 2008/03/31 10:27:41 hewitson 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.html,v 1.14 2008/03/31 10:27:41 hewitson Exp $ 0011 % 0012 % HISTORY: 30-01-2007 M Hewitson 0013 % Creation 0014 % 0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0016 0017 0018 % Check if this is a call for parameters 0019 if nargin > 1 0020 if ischar(varargin{1}) 0021 in = char(varargin{1}); 0022 if strcmp(in, 'Params') 0023 n = plist; 0024 return 0025 elseif strcmp(in, 'Version') 0026 VERSION = '$Id: nparams.html,v 1.14 2008/03/31 10:27:41 hewitson Exp $'; 0027 n = VERSION; 0028 return 0029 elseif strcmp(in, 'Category') 0030 CATEGORY = 'Helper'; 0031 n = CATEGORY; 0032 return 0033 end 0034 end 0035 end 0036 0037 n = length(pl.params); 0038 0039 % END