Trigger - Event trigger

Description

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.

Characteristics

Applies toObject: event
SimBiology typeString, function handle
SimBiology values

Specify MATLAB® expression as string. Default is '' (None).

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

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS