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