Main Content

Stateflow Charts

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

ChartImplement control logic with finite state machine
State 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
sfprintPrint Stateflow charts
sfhelpOpen Stateflow documentation in Help 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)