AddAlphaPURPOSEAdds a new alpha-element to a policy.
SYNOPSISfunction [P id]=AddAlpha(P,element,action)
DESCRIPTIONAdds a new alpha-element to a policy. Adds a new element (with the associated action) to a given policy object. Returns the updated policy and the identifier assigned to the new element. See also Policy. CROSS-REFERENCE INFORMATIONThis function calls:SOURCE CODE0001 function [P id]=AddAlpha(P,element,action) 0002 % Adds a new alpha-element to a policy. 0003 % 0004 % Adds a new element (with the associated action) to a given 0005 % policy object. 0006 % Returns the updated policy and the identifier assigned to 0007 % the new element. 0008 % 0009 % See also Policy. 0010 0011 if P.n==0 0012 P.elements={element}; 0013 P.actions={action}; 0014 P.n=1; 0015 else 0016 P.elements=[P.elements {element}]; 0017 P.actions=[P.actions {action}]; 0018 P.n=P.n+1; 0019 end 0020 id=P.n; |