| Contents | Index |
eventObj =
addevent(modelObj, 'TriggerValue',
'EventFcnsValue')
eventObj = addevent(...'PropertyName', PropertyValue...)
| 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 | A string or a cell array of strings, each of which specifies an assignment of the form 'objectname = expression', where objectname 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. |
eventObj = addevent(modelObj, 'TriggerValue', 'EventFcnsValue') creates an event object (eventObj) and adds the event to the model (modelObj). In the event object, this method assigns a value (TriggerValue) to the property TriggerCondition, assigns a value (EventFcnsValue) to the property EventFcns, and assigns the model object (modelObj) to the property Parent. 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 Event Object in the SimBiology User's Guide documentation.
eventObj = addevent(...'PropertyName', PropertyValue...) defines
optional properties. The property name and property value pairs can
be any format supported by the function set (for
example, name-value string pairs, structures, and name-value cell
array pairs).
You can view additional object properties with the get command. You can modify additional object properties with the set command. To view events of a model object (modelObj), use the command get(modelObj, 'Events').
| copyobj (any object) | Copy SimBiology object and its children |
| delete (any object) | Delete SimBiology object |
| display (any object) | Display summary of SimBiology object |
| get (any object) | Get object properties |
| set (any object) | Set object properties |
| Active | Indicate object in use during simulation |
| EventFcns | Event expression |
| Name | Specify name of object |
| Notes | HTML text describing SimBiology object |
| Parent | Indicate parent object |
| Tag | Specify label for SimBiology object |
| Trigger | Event trigger |
| Type | Display SimBiology object type |
| UserData | Specify data to associate with object |
Create a model object, and then add an event object.
modelObj = sbmlimport('oscillator')
eventObj = addevent(modelObj, 'time>= 5', 'OpC = 200');Get a list of properties for an event object.
get(modelObj.Events(1));
Or
get(eventObj)
MATLAB displays a list of event properties.
Active: 1
Annotation: ''
EventFcns: {'OpC = 200'}
Name: ''
Notes: ''
Parent: [1x1 SimBiology.Model]
Tag: ''
Trigger: 'time >= 5'
Type: 'event'
UserData: []
See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |