Follow modeling guidelines when creating charts with events, states, and transitions. To learn about considerations when generating code for models that include Stateflow charts, see Code Generation of Stateflow Blocks.
Modeling Guidelines for Stateflow Charts (Stateflow)
Efficiently model charts by using states, transitions, and events.
When you develop models and generate code for charts, use the modeling guideline recommendations.
The code generator produces code for Stateflow blocks for rapid prototyping.
Produce standalone code for linked and unlinked atomic subcharts.
Describes when and how to control inlining of state functions in generated code.
Generate code for an air-fuel ratio control system designed with Simulink® and Stateflow®.
Be aware of limitations that apply to using a model hierarchy for code generation.