If you have Simulink® Coder™ or Embedded Coder®, you can generate C or C++ code from models that include Stateflow® blocks.
Generate code from models that include Stateflow blocks.
Store the generated code for part of a Stateflow chart in a separate file.
Produce standalone code for linked and unlinked atomic subcharts.
Implement array data in column-major, row-major, or multidimensional layouts.
Set parameters in the Model Configuration Parameters dialog box programmatically.
Evaluate graphical and nongraphical objects in each Stateflow machine.