addrule
Add rule object to model
Syntax
Description
creates a rule object ruleObj
= addrule(modelObj
,ruleExpression
)ruleObj
and adds the object to the SimBiology® model object modelObj
. The function also assigns
ruleExpression
to theRule
property ofruleObj
.modelObj
to theParent
property ofruleObj
.'initialAssignment'
to theRuleType
property for all assignment rules and'algebraic'
for all other rules.
To apply the rule in your simulation, set the Active
property of ruleObj
to true
.
also specifies the type of rule to create and add to the model. For more information on the
types of rules, see Definitions and Evaluations of Rules in SimBiology Models.ruleObj
= addrule(modelObj
,ruleExpression
,ruleType
)
also sets the properties of the rule object using one or more name-value arguments.
ruleObj
= addrule(___,Name=Value)Name
is the property name and Value
is the
corresponding value.