| Contents | Index |
Trigger is a property of an Event object
A Trigger is a condition that must become true for an event to execute. You can use 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. A Trigger can access species, parameters, and compartments.
A trigger can contain the keyword time and relational operators to trigger an event that occurs at a specific time during the simulation. For example, time >= x. In this example trigger, note that:
The units associated with the keyword time are the units for the TimeUnits property for the Configset object associated with the simulation.
If x is an expression containing compartments, species, or parameters, then any units associated with the expression must have the same dimensions as the keyword time.
If x is a raw number, then its dimensions (and units, if unit conversion is on) are assumed to be the same as the keyword time.
For more information about how the SimBiology software handles events, see How Events Are Evaluated in the SimBiology User's Guide documentation. For examples of event functions, see Specifying Event Triggers in the SimBiology User's Guide documentation.
| Applies to | Object: event |
| SimBiology type | String, function handle |
| SimBiology values | Specify a MATLAB expression as a string. Default is '' (empty string). |
| 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')

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 |