Skip to Main Content Skip to Search
Product Documentation

Trigger - Event trigger

Description

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:

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.

Characteristics

Applies toObject: event
SimBiology typeString, function handle
SimBiology values

Specify a MATLAB expression as a string. Default is '' (empty string).

AccessRead/write

Examples

  1. Create a model object, and then add an event object.

    modelObj = sbmlimport('oscillator');
    eventObj = addevent(modelObj, 'time>= 5', 'OpC = 200');
  2. Set the Trigger property of the event object.

    set(eventObj, 'Trigger', '(time >=5) && (speciesA<1000)');
    
  3. Get the Trigger property.

    get(eventObj, 'Trigger')

See Also

Event object, EventFcns

  


Free Computational Biology Interactive Kit

See how to analyze, visualize, and model biological data and systems using MathWorks products.

Get free kit

Trials Available

Try the latest computational biology products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS