comparison m-toolbox/classes/@pest/fromValues.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 % FROMVALUES construct a pest object from different values.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % FUNCTION: fromValues
5 %
6 % DESCRIPTION: Construct a pest object from different values.
7 %
8 % CALL: pe = fromValues(pe, pli)
9 %
10 % PARAMETER: pe - empty pest object
11 % pli - input plist
12 %
13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
14 function obj = fromValues(obj, pli)
15
16 VERSION = '$Id: fromValues.m,v 1.6 2011/08/16 05:16:32 hewitson Exp $';
17
18 % get pzmodel info
19 ii = pest.getInfo('pest', 'From Values');
20
21 % Set the method version string in the minfo object
22 ii.setMversion([VERSION '-->' ii.mversion]);
23
24 % Combine input plist with default values
25 pl = applyDefaults(ii.plists, pli);
26
27 % get values
28 obj.y = pl.find('y');
29 obj.names = pl.mfind('paramNames', 'names', 'params');
30 obj.dy = pl.find('dy');
31 obj.cov = pl.find('cov');
32 obj.corr = pl.find('corr');
33 obj.chi2 = pl.find('chi2');
34 obj.dof = pl.find('dof');
35 obj.models = pl.find('models');
36 obj.pdf = pl.find('pdf');
37
38 % Add history
39 obj.addHistory(ii, pl, [], []);
40
41 % Set object properties
42 obj.setObjectProperties(pl);
43
44 end