Main Content

Simulink Coder

Generate C and C++ code from Simulink and Stateflow models

Simulink® Coder™ (formerly Real-Time Workshop®) 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 non-real-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.

Get Started

Learn the basics of Simulink Coder

Architecture and Component Design

Design software systems by developing algorithms intended for generated code deployment, rapid prototyping, or real-time simulation

Code Generation

Code generation and debugging, report generation

Deployment, Integration, and Supported Hardware

Integrate, protect, package, and relocate generated code; deploy generated code to supported hardware

Code Efficiency

Optimize generated code by minimizing memory requirements and speeding up execution

Code and Tool Customization

Customize generated code and code generation tools for a project or organization

Verification and Testing

Tune parameters, compare simulation and generated code execution results, and analyze code performance


Check Bug Reports for Issues and Fixes

Software is inherently complex and is not free of errors. The output of a code generator might contain bugs, some of which are not detected by a compiler. bat365 reports critical known bugs brought to its attention on its Bug Report system at /support/bugreports/. In the search bar, type the phrase "Incorrect Code Generation" to obtain a report of known bugs that produce code that might compile and execute, but still produce wrong answers. To save a search, click Save Search.

The bug reports are an integral part of the documentation for each release. Examine periodically all bug reports for a release, as such reports may identify inconsistencies between the actual behavior of a release you are using and the behavior described in this documentation.

In addition to reviewing bug reports, you should implement a verification and validation strategy to identify potential bugs in your design, code, and tools.

Search R2023a Bug Reports

Known Bugs for Incorrect Code Generation
All Known Bugs for This Product