Stateflow.Event

Create event

Syntax

event_new = Stateflow.Event(parent)

Description

The Stateflow.Event method is a constructor method for creating an event in a parent chart, state, or box. This method returns a handle to the new Event object.

Arguments

parent

Handle to parent chart, state, or box of new event

Returns

event_new

Handle to the Event object for the new event

Examples

If sA is a handle to a State object for an existing state A, the following command creates a new event parented (contained by) state A:

event_new = Stateflow.Event(sA)

The new event is named 'event' with an incremented suffix to distinguish additional creations . event_new is a handle to an Event object for the new event that you use to rename the event, set its properties, and execute Event methods for the event.

Introduced before R2006a