annotate _FullBNT/BNT/CPDs/@tabular_decision_node/set_fields.m @ 9:4ea6619cb3f5 tip

removed log files
author matthiasm
date Fri, 11 Apr 2014 15:55:11 +0100
parents b5b38998ef3b
children
rev   line source
matthiasm@8 1 function CPD = set_params(CPD, varargin)
matthiasm@8 2 % SET_PARAMS Set the parameters (fields) for a tabular_decision_node object
matthiasm@8 3 % CPD = set_params(CPD, name/value pairs)
matthiasm@8 4 %
matthiasm@8 5 % The following optional arguments can be specified in the form of name/value pairs:
matthiasm@8 6 %
matthiasm@8 7 % policy - the table containing the policy
matthiasm@8 8 %
matthiasm@8 9 % e.g., CPD = set_params(CPD, 'policy', T)
matthiasm@8 10
matthiasm@8 11 args = varargin;
matthiasm@8 12 nargs = length(args);
matthiasm@8 13 for i=1:2:nargs
matthiasm@8 14 switch args{i},
matthiasm@8 15 case 'policy', CPD.CPT = args{i+1};
matthiasm@8 16 otherwise,
matthiasm@8 17 error(['invalid argument name ' args{i}]);
matthiasm@8 18 end
matthiasm@8 19 end