A state transition table is an alternative way of expressing sequential modal logic. Instead of drawing states and transitions graphically in a Stateflow® chart, you express the modal logic in tabular format.
Benefits of using state transition tables include:
Ease of modeling train-like state machines, where the modal logic involves transitions from one state to its neighbor
Concise, compact format for a state machine
Reduced maintenance of graphical objects
When you add or remove states from a chart, you have to rearrange states, transitions, and junctions. When you add or remove states from a state transition table, you do not have to rearrange any graphical objects.
State transition tables support MATLAB action language. For more information about this action language, see .
The following state transition table contains the modal logic for maintaining the temperature of a boiler between two set points:
If you create a Stateflow chart to represent the same modal logic, the chart looks something like this: