Mercurial > hg > ltpda
comparison m-toolbox/classes/@ssm/modelHelper_checkParameters.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % MODELHELPER_CHECKPARAMETERS compare the user requested parameter names to | |
2 % the model parameter names. | |
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
4 % | |
5 % DESCRIPTION: MODELHELPER_CHECKPARAMETERS compare the user requested parameter names to | |
6 % the model parameter names. | |
7 % | |
8 % CALL: pl = modelHelper_checkParameters(pl, defaultPlist) | |
9 % | |
10 % INPUTS: | |
11 % 'pl' - the user plist | |
12 % 'paramNames' - the model's parameter plist | |
13 % | |
14 % OUTPUTS: | |
15 % | |
16 % 'pl' - plist of model parameters. | |
17 % | |
18 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
19 function pl = modelHelper_checkParameters(pl, modelname, paramNames) | |
20 | |
21 setNames = pl.find('param names'); | |
22 | |
23 for kk=1:numel(setNames) | |
24 | |
25 pname = setNames{kk}; | |
26 | |
27 if ~ismember(pname, paramNames) | |
28 warning('Model %s does not contain a parameter <%s>', modelname, pname); | |
29 end | |
30 | |
31 end | |
32 | |
33 end |