Simulink Coder generates and executes C and C++ code from Simulink models, Stateflow charts, and MATLAB functions. The generated source code can be used for real-time and nonreal-time applications, including simulation acceleration, rapid prototyping, and hardware-in-the-loop testing. You can tune and monitor the generated code using Simulink or run and interact with the code outside MATLAB and Simulink.
To share your Simulink simulations as Functional Mockup Units (FMUs), use Simulink FMU Builder.
Generate Code and Executables from Simulink
Generate C, C++, shared libraries, and executables from Simulink, Stateflow, and many add-on products including Simscape and Deep Learning Toolbox.
Prototype and Test with Hardware
Run code generated from Simulink for desktop execution, rapid prototyping, and testing of embedded controllers and autonomous systems.
Tune Parameters and Log Data in Real Time
Optimize your design within Simulink while the code is executing on external devices by viewing and tuning data using scopes, dashboards, and live-stream plots.
Product Resources:
Simulink Coder FAQs
Simulink Coder generates and executes C and C++ code from Simulink models, Stateflow charts, and MATLAB functions for real-time and nonreal-time applications.
The generated source code can be used for simulation acceleration, rapid prototyping, hardware-in-the-loop testing, and running on external devices.
Yes, you can run and interact with the generated code outside MATLAB and Simulink, or tune and monitor it from within Simulink.
Simulink Coder generates code from Simulink models, Stateflow charts, MATLAB functions, and models from many add-on products including Simscape and Deep Learning Toolbox.
Yes, you can optimize your design within Simulink while code executes on external devices by viewing and tuning data using scopes, dashboards, and live-stream plots.
Simulink Compiler is used to share Simulink simulations as standalone executables, web apps, or Functional Mockup Units (FMUs), while Simulink Coder generates C and C++ code for embedded applications and testing.
Yes, Simulink Coder supports running generated code for desktop execution, rapid prototyping, and testing of embedded controllers and autonomous systems.
Yes, Simulink Coder can generate C++ code from Deep Learning Toolbox models for Intel, ARM CPUs, and NVIDIA GPUs.