| Stateflow User's Guide | ![]() |
Constructor for creating a state
Syntax
Description
The Stateflow.State method is a constructor method for creating a state for a parent chart, state, box, or function, that returns a handle the State object for the new state.
Arguments
parent |
Handle to the object for the parent chart, state, box, or function for the new state |
Returns
state_new |
Handle to State object for newly created state |
Example
If sA is a handle to a State object for the existing state A, the following command creates a new state parented (contained by) state A:
The new state appears in the upper left-hand corner of state A in the diagram editor. state_new is a handle to the State object for the new state that you use to rename the state, set its properties, and execute its methods.
| Stateflow.Note | Stateflow.Target | ![]() |
© 1994-2005 The MathWorks, Inc.