matthiasm@8: function vals = get_field(CPD, name) matthiasm@8: % GET_PARAMS Get the parameters (fields) for a tabular_decision_node object matthiasm@8: % vals = get_params(CPD, name) matthiasm@8: % matthiasm@8: % The following fields can be accessed matthiasm@8: % matthiasm@8: % policy - the table containing the policy matthiasm@8: % matthiasm@8: % e.g., policy = get_params(CPD, 'policy') matthiasm@8: matthiasm@8: args = varargin; matthiasm@8: nargs = length(args); matthiasm@8: for i=1:2:nargs matthiasm@8: switch args{i}, matthiasm@8: case 'policy', vals = CPD.CPT; matthiasm@8: otherwise, matthiasm@8: error(['invalid argument name ' args{i}]); matthiasm@8: end matthiasm@8: end