Simulink Subsystems as States
Model continuous or periodic Simulink algorithms embedded in Stateflow states. Save a Simulink based state as a subsystem in a custom library. When the library block is updated, the changes are reflected in all Stateflow charts containing the block.
Use Simulink subsystems within Stateflow states to model hybrid systems.
Define a Simulink based state in your Stateflow chart.
Set the state variables of your Simulink based states.
Ensure that the variables in your Simulink based state map to chart outputs.
Specify properties for your Simulink based state.