Main Content

Highlight Flow of Logic in a State Transition Table

A state transition table represents a finite state machine for sequential modal logic in tabular format. Instead of drawing states and transitions in a Stateflow® chart, you can use a state transition table to model a state machine in a concise, compact format that requires minimal maintenance of graphical objects. 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.

    State transition table with transition cells highlighted in red.

  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.

    Autogenerated chart that shows transitions in flow highlighted in blue.

Related Topics