Code Generation

Generate C or C++ code from your chart

If you have Simulink® Coder™ or Embedded Coder®, you can generate C or C++ code from models that include Stateflow® blocks.

Topics

Generate C or C++ Code from Stateflow Blocks

Generate code from models that include Stateflow blocks.

Generate Reusable Code

Produce standalone code for atomic subcharts and unit testing.

Select Array Layout for Matrices in Generated Code

Implement array data in column-major, row-major, or multidimensional layouts.

Command-Line API to Set Simulation and Code Generation Parameters

Set parameters in the Model Configuration Parameters dialog box programmatically.