Stateflow User's Guide Previous page   Next Page

Creating a State

You create states by drawing them in the Stateflow diagram editor for a particular Stateflow chart (block). The following is a depiction of the Stateflow diagram editor:

  1. Select the State tool.
  2. Move the mouse cursor into the drawing area.
  1. In the drawing area, the mouse cursor becomes state-shaped (rectangular with oval corners).

  1. Click in a particular location to create a state.
  1. The created state appears with a question mark (?) label in its upper left-hand corner.

  1. Click the question mark.
  1. A text cursor appears in place of the question mark.

  1. Enter a name for the state and click outside of the state when finished.

The label for a state specifies its required name and optional actions. See Labeling States for more detail.

To delete a state, click it to select it and choose Cut (Ctrl+X) from the Edit or any shortcut menu or press the Delete key.


Previous page  Creating States in Stateflow Charts Moving and Resizing States Next page

© 1994-2005 The MathWorks, Inc.