Main Content

Code Generation from MATLAB Code

Generate C/C++ code from MATLAB® code for embedded systems

The Embedded Coder® product extends the MATLAB Coder™ product with features that you can use for embedded software development. With the Embedded Coder product, you can generate code that has the clarity and efficiency of professional handwritten code. For example, you can:

  • Generate code that is compact and executes efficiently for embedded systems.

  • Customize the appearance of the generated code.

  • Optimize generated code for a specific target environment.

  • Integrate existing applications, functions, and data.

  • Enable tracing, reporting, and testing options that facilitate code verification activities.

Generating C/C++ code from MATLAB code with Embedded Coder requires these products:


  • MATLAB Coder

  • Embedded Coder

MATLAB Coder supports a subset of core MATLAB language features, including program control constructs, functions, and matrix operations. To generate C/C++ code, use the MATLAB Coder app or the codegen function. With Embedded Coder, you have access to additional options and advanced optimizations for fine-grain control of the generated code’s functions, files, and data. See Embedded Coder Capabilities for Code Generation from MATLAB Code.