addevent (model)
Add event object to model object
Syntax
eventObj =
addevent(modelObj, 'TriggerValue',
'EventFcnsValue')
eventObj = addevent(...'PropertyName', PropertyValue...)
Arguments
modelObj | Model object. |
TriggerValue | Required property to specify a trigger condition. Must be a MATLAB® expression
that evaluates to a logical value. Use the keyword 'time' to
specify that an event occurs at a specific time during the simulation.
For more information, see Trigger. |
EventFcnsValue | Character vector or a cell array of character vectors, each
of which specifies an assignment of the form ',
where is
the name of a valid object. Defines what occurs when the event is
triggered. For more information, see EventFcns. |
PropertyName | Property name for an event object from Property Summary. |
PropertyValue | Property value. For more information on property values, see the property reference for each property listed in Property Summary. |
Description
creates
an eventObj =
addevent(modelObj, 'TriggerValue',
'EventFcnsValue')Event object ()
and adds the event to the model (eventObj).
In the event object, this method assigns a value (modelObj)
to the property TriggerValueTriggerCondition, assigns a value
() to
the property EventFcnsValueEventFcns, and assigns the model object ()
to the property modelObjParent. In the model object, this
method appends the event object to the property Events.
When the trigger expression in the property Trigger changes
from false to true, the assignments in EventFcns are
executed during simulation.
For details on how events are handled during a simulation, see Events in SimBiology Models.
eventObj = addevent(...' defines
optional properties. The property name and property value pairs can
be any format supported by the function PropertyName', PropertyValue...)set.
Property Summary
| Notes | HTML text describing SimBiology object |
| Type | Display SimBiology object type |
| UserData | Specify data to associate with object |
