Stateflow User's Guide Previous page   Next Page

Using History Junctions to Extend Charts and States

History junctions extend the ability of charts and states by recording the activity of substates inside superstates. Use a history junction in a chart or superstate to indicate that its last active substate becomes active when the chart or superstate becomes active.

The following sections describe how to create, and specify properties for history junctions in Stateflow:

Creating a History Junction

To create a junction, do the following:

  1. In the diagram toolbar, click the History Junction tool

    .
  2. Move the cursor into the diagram editor.
  1. The cursor takes on the shape of a junction.

  1. Click to place a history junction inside the state whose last active substate it records.

To create multiple history junctions, do the following:

  1. In the diagram toolbar, double-click the History Junction tool.
  2. The button is now in multiple object mode.
  3. Click anywhere in the drawing area to place a history junction.
  4. Move to and click another location to create an additional history junction.
  5. Click the History Junction tool or press the Esc key to cancel the operation.

To move a history junction to a new location, click and drag it to the new position.

Changing History Junction Size

To change the size of junctions, do the following:

  1. Select the history junctions whose size you want to change.
  2. Place the cursor over one of the junctions and right-click.
  3. In the resulting submenu, place the cursor over Junction Size.
  1. A menu of junction sizes appears.

  1. Select a size from the menu of junction sizes.

Previous page  Extending Stateflow Chart Diagrams Changing History Junction Properties Next page

© 1994-2005 The MathWorks, Inc.