Get Started with Stateflow
Stateflow® is a product that provides a graphical language that includes state transition diagrams, flow charts, state transition tables, and truth tables. You can use Stateflow to describe how MATLAB® algorithms and Simulink® models react to input signals, events, and time-based conditions.
Stateflow enables you to design and develop supervisory control, task scheduling, fault management, communication protocols, user interfaces, and hybrid systems.
With Stateflow, you model combinatorial and sequential decision logic that can be simulated as a block within a Simulink model or executed as an object in MATLAB. Graphical animation enables you to analyze and debug your logic while it is executing. Edit-time and run-time checks ensure design consistency and completeness before implementation.
Tutorials
- Design Finite State Machines in Stateflow
Learn about how Stateflow works and how to choose between a chart and a state transition table.
- STEP 1: Create Stateflow Charts
- STEP 2: Log, Verify, and Debug Charts
- STEP 3: Create Parent and Child Operating Modes
- STEP 4: Connect Transitions by Using Junctions
- STEP 5: Execute States in Parallel
- STEP 6: Reuse Logic in Charts
Model Rechargeable Battery System as Chart
Create Stateflow charts that model control logic by using finite state machines.
Model Rechargeable Battery System by Using a State Transition Table
Create state transition tables that model control logic by using finite state machines.
Interactive Learning
Stateflow Onramp
Free, self-paced, interactive Stateflow course
Videos
Getting Started with Stateflow
Build and simulate a Stateflow chart in a Simulink model
What Is Stateflow?
Design and simulate state charts by using Stateflow
MATLAB Tech Talks: State Machines
Learn the fundamental concepts of state machines



