This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Stateflow

Model and simulate decision logic using state machines and flow charts

Stateflow® 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.

Getting Started

Learn the basics of Stateflow

Chart Programming

Program state machines for combinatorial and sequential logic

Design Complex Logic

Follow common design patterns for supervisory logic

Simulation in Simulink

Simulate Stateflow charts as blocks in Simulink models

Execution in MATLAB

Execute standalone Stateflow charts as objects in MATLAB

Verification and Code Generation

Test, debug, log data, and generate code