Home > classes > @plist > nparams.m

nparams

PURPOSE ^

NPARAMS returns the number of param objects in the list.

SYNOPSIS ^

function n = nparams(pl, varargin)

DESCRIPTION ^

 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.5 2008/02/22 22:28:09 hewitson Exp $

 HISTORY:     30-01-2007 M Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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.5 2008/02/22 22:28:09 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.m,v 1.5 2008/02/22 22:28:09 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

Generated on Mon 31-Mar-2008 13:54:54 by m2html © 2003