sbioevent - Construct event object

Syntax

eventObj = sbioevent(TriggerValue, EventFcnsValue)

eventObj = sbioevent(...'PropertyName', PropertyValue...)

Arguments

TriggerValueRequired property to specify a trigger condition. Must be a MATLAB expression that evaluates to a logical value.
EventFcnsValueA 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 SimBiology® object.
PropertyNameProperty name for an Event object from theProperty Summary table below.
PropertyValueProperty value. For more information on property values see the property reference for each property listed in the Property Summary.

Description

eventObj = sbioevent(TriggerValue, EventFcnsValue) creates a SimBiology event object, assigns a value (TriggerValue) for the property Trigger, assigns a value (EventFcnsValue) to the property EventFcns, and returns the object (eventObj).

During model simulation, an event is triggered and its EventFcns are evaluated when the Trigger transitions from false to true. In order for an event to be used in a simulation, the event object must be added to a SimBiology model object with the copyobj function.

The preferred way to work with events is to add an event to a SimBiology model with the addevent function.

For details on how events are handled during a simulation, see Events in the SimBiology User's Guide.


eventObj = sbioevent(...'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).

Method Summary

copyobj (any object)Copy SimBiology® object and its children
display (any object)Display summary of SimBiology® object

Property Summary

ActiveIndicate object in use during simulation
AnnotationStore link to URL or file
EventFcnsEvent expression
NameSpecify name of object
NotesHTML text describing SimBiology® object
ParentIndicate parent object
TagSpecify label for SimBiology® object
TriggerEvent trigger
TypeDisplay top-level SimBiology® object type
UserDataSpecify data to associate with object

Examples

  1. Create an event object.

    eventObj = sbioevent('time>= 5', 'OpC = 200');
  2. Get a list of properties for the event object.

    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 Also

Methods — addevent, copyobj

Objects — Event object

  


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