Main Content

Record State Activity by Using History Junctions

A history junction records the activity of substates inside superstates. Use a history junction in a superstate to indicate that its last active substate becomes active when the superstate becomes active. For more information, see History Junctions.

Create a History Junction

To create a history junction, do the following:

  1. In the editor toolbar, click the History Junction icon:

  2. Move your pointer into the chart.

  3. 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 editor toolbar, double-click the History Junction icon.

    The button is now in multiple-object mode.

  2. Click anywhere in the drawing area to place a history junction.

  3. Move to and click another location to create an additional history junction.

  4. Click the History Junction icon 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.

Change History Junction Size

To change the size of junctions:

  1. Select the history junctions whose size you want to change.

  2. Right-click one of the junctions and select Junction Size.

  3. Select a size from the list of junction sizes.

Change History Junction Properties

To edit the properties for a junction:

  1. Right-click a junction and select Properties.

    The History Junction dialog box appears.

  2. Edit the fields in the properties dialog box.




    Parent of this history junction; read-only; click the hypertext link to bring the parent to the foreground.


    Textual description/comment.

    Document Link

    Enter a URL address or a general MATLAB® command. Examples are, mailto:email_address, and edit/spec/data/speed.txt.

  3. When finished editing, click one of the following buttons:

    • Apply to save the changes

    • Cancel to cancel any changes

    • OK to save the changes and close the dialog box

    • Help to display the Stateflow® online help in an HTML browser window