| SimBiology® | ![]() |
A Trigger is a condition that must become true for an event to be executed. You can a combination of relational and logical operators to build a trigger expression. Trigger can be a string, an expression, or a function handle that when evaluated returns a value of true or false. Triggers can access species, parameters, and compartments.
A trigger can contain the keyword 'time', to define an event that occurs at a specific time during the simulation.
For more information about how the SimBiology® software handles events see, How Events Are Evaluated in the SimBiology User's Guide. For examples of event functions see Specifying Event Triggers in the SimBiology User's Guide.
| Applies to | Object: event |
| SimBiology type | String, function handle |
| SimBiology values | Specify MATLAB® expression as string. Default is '' (None). |
| Access | Read/Write |
Create a model object, and then add an event object.
modelObj = sbmlimport('oscillator');
eventObj = addevent(modelObj, 'time>= 5', 'OpC = 200');Set the Trigger property of the event object.
set(eventObj, 'Trigger', '(time >=5) && (speciesA<1000)');
Get the Trigger property.
get(eventObj, 'Trigger')
![]() | Tag | Time | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |