Stateflow | ![]() ![]() |
Quick Start
This section provides you with a quick introduction to using Stateflow. In this section, you will use Stateflow to create, run, and debug a model of a simple power switch.
The Power Switch Model
The following figure shows a Stateflow diagram that represents the power switch we intend to model.
Here is a sample of the completed Simulink model.
When you simulate this model, the generation of the input event from Simulink, Switch
, will toggle the activity of the states between Power_on
and Power_off
.
![]() | Design Approaches | Creating a Simulink Model | ![]() |