Code Generation
R2026bC/C++ and MEX code generation, fixing errors, behavioral
verification
To generate C/C++ source code, static libraries, dynamic libraries, or executables from
MATLAB® code, follow the Overview of Code Generation Using MATLAB Coder. Generate and verify code using the MATLAB Coder app or the codegen command.
To move through the fundamental steps of the code generation workflow, click on the boxes in the image below.
Code Generation Overview
Categories
- Code Generation Fundamentals
Main steps of code generation workflow
- Configure Build Process of Generated Code
Customize compilation and linking of generated source code
- External Code Integration
Call external code from MATLAB code
- Code Verification
Behavioral verification of generated code, traceability, code generation reports
- Code Replacement
Customize code generated from MATLAB code using a code replacement library
- Generate and Call Reentrant Code
Generate and call reentrant code for single or multithreaded environments