Main Content

Highlight Flow of Logic in a State Transition Table

A state transition table is an alternative way of expressing sequential modal logic. Instead of drawing states and transitions graphically in a Stateflow® chart, use state transition tables to express the modal logic in tabular format. State transition tables are supported only as blocks in a Simulink® model. For more information, see State Transition Tables in Stateflow.

To visualize a flow of logic, you can highlight one transition cell per row in your state transition table. Highlighting can be used to show the primary flow of logic from one state to another or the flow that represents an error condition.

The highlighting persists across MATLAB sessions and appears in the autogenerated state transition diagram and the state transition table.

To highlight transition cells:

  1. In the transition table editor, right-click the transition cell and select Mark as primary transition.

    The transition cell appears with a red border.

  2. To complete the flow, highlight additional cells, one per row.

    For example:

  3. To view the flow in the autogenerated state diagram, in the Debug tab, click Show Auto Chart.

    The transitions that represent the flow appear highlighted in the diagram.

Related Topics