Main Content

Complex Logic

Model complex logic using Stateflow® diagrams

To model complex logic in a Simulink® model, consider using Stateflow software.

Stateflow extends Simulink with a design environment for developing state transition diagrams and flow charts. Stateflow provides the language elements required to describe complex logic in a natural, readable, and understandable form. It is tightly integrated with MATLAB® and Simulink products, providing an efficient environment for designing embedded systems that contain control, supervisory, and mode logic.

Topics

Model Finite State Machines (Stateflow)

Model dynamic systems as finite state machines in Stateflow.

Construct and Run a Stateflow Chart (Stateflow)

Build state transition diagrams in the Stateflow graphical programming editor.

Share Data with Simulink and the MATLAB Workspace (Stateflow)

Define data to share with Simulink models and the MATLAB base workspace.

Monitor State Activity Through Active State Data (Stateflow)

Automatically track which state is active during simulation.

Access Bus Signals Through Stateflow Structures (Stateflow)

Define Stateflow structures for input, output, and local access to bus signals.

Synchronize Model Components by Broadcasting Events (Stateflow)

Use events to communicate with Simulink and MATLAB.

Communicate with Stateflow Charts by Sending Messages (Stateflow)

Synchronize model components and share data by sending messages between Stateflow charts.

Related Information

Featured Examples