Main Content

stateflow

Open Stateflow template page

Syntax

Description

stateflow opens the Stateflow® section of the Simulink® Start Page. In this section, you can select templates for several common chart types, including models that contain nested or parallel states.

This image shows the template list as it appears in the Simulink Start Page.

List of all the templates available for Stateflow.

example

Examples

collapse all

Use the Simple Stateflow Chart template to create a Stateflow chart with two states. For more information about designing a simple Stateflow chart, see Create Stateflow Charts.

Use the stateflow command to open the Stateflow section of the Simulink Start Page. Click Simple Stateflow Chart.

The Simple Stateflow Chart template.

Use the Heirarchical Chart template to create a Stateflow chart with nested child states. For more information about parent and child states, see Create Parent and Child Operating Modes.

Use the stateflow command to open the Stateflow section of the Simulink Start Page. Click Heirarchical Chart.

The Heirarchical Chart template.

Use the Simple State Transition Table template to create a state transition table with two states. For more information about state transition tables, see Model Finite State Machines Using State Transition Tables.

Use the stateflow command to open the Stateflow section of the Simulink Start Page. Click Simple State Transition Table.

The Simple State Transition Table template.

Since R2025a

Use the Chart with Reusable Logic template to create a Stateflow chart that includes a MATLAB Function, a Simulink Function, and a graphical function. For more information about reusable logic, see Reuse MATLAB Code by Defining MATLAB Functions and Reuse Simulink Functions in Stateflow Charts.

Use the stateflow command to open the Stateflow section of the Simulink Start Page. Click Chart with Reusable Logic.

The Chart with Reusable Logic template.

Since R2025a

Use the Chart with Parallel States template to create a Stateflow chart with two parallel states. For more information about parallel states, see Execute States in Parallel.

Use the stateflow command to open the Stateflow section of the Simulink Start Page. Click Chart with Parallel States.

The Chart with Parallel States template.

Use the Moore Chart template to create a Moore chart. A Moore chart is a Stateflow chart where the outputs do not depend on inputs, previous outputs, or temporal logic. For more information about Moore charts, see Overview of Mealy and Moore Machines.

Use the stateflow command to open the Stateflow section of the Simulink Start Page. Click Moore Chart.

The Moore Chart template.

Version History

Introduced before R2006a

expand all

See Also

|