Main Content

Stateflow Charts

R2026b
Design modal logic in graphical form

Model systems with a finite number of states. Use states to graphically denote the modes of the system. Conditional transitions provide pathways between these modes. Control the behavior of your system through actions in states and on transitions.

Blocks

expand all

Chart blockChartImplement control logic with finite state machine
State Transition Table blockState Transition TableRepresent modal logic in tabular format
Truth TableRepresent logical decision-making behavior with conditions, decisions, and actions

Functions

expand all

sfnewCreate Simulink model that contains an empty Stateflow block
sflibOpen Stateflow block library
stateflowOpen Stateflow template page
sfopenOpen Simulink model
sfcloseClose Stateflow chart
sfsaveSave Simulink model
sfprintExport Stateflow chart images
sfhelpOpen Stateflow documentation in the system web browser
sfdebuggerOpen Breakpoints and Watch window
sfexplrOpen Model Explorer
sfprefSet preferences for Stateflow charts
convertToChartConvert state transition table to Stateflow chart (Since R2023b)
convertToSTTConvert Stateflow chart to state transition table (Since R2023b)
disableInstrumentationDisable Stateflow animation and breakpoints (Since R2026a)

Objects

expand all

AnnotationDescriptive text or image in chart
Atomic BoxEncapsulate functions in separate namespace
Atomic SubchartReusable, independent subcomponents in Stateflow chart
BoxBox that delineates areas of Stateflow chart
Default TransitionTransition with a destination but no source that specifies the initial substate to enter
Entry JunctionEntry junction that crosses state boundary of Stateflow chart
Exit JunctionExit junction that crosses state boundary of Stateflow chart
Graphical FunctionGraphical function that uses flow charts
History JunctionJunction that records and restores the previously active substate when a superstate is reentered
JunctionDecision points in Stateflow chart
MATLAB FunctionMATLAB function in Stateflow chart
Simulink Based StateSimulink subsystem in Stateflow chart
Simulink FunctionSimulink function subsystem in Stateflow chart
StateOperating mode in Stateflow chart
Truth Table FunctionTruth table in Stateflow chart