Skip to Main Content Skip to Search
Product Documentation

Stateflow.Event - Constructor for creating event

Syntax

event_new = Stateflow.Event(parent)

Description

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

Arguments

parent

Handle to parent chart or state 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.

  


Free Stateflow Interactive Kit

Learn how engineers use Stateflow to model state machines in their Simulink models.


Get free kit

Trials Available

Try the latest version of Stateflow.


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