Generate C and C++ code from MATLAB code

MATLAB Coder™ generates readable and portable C and C++ code from MATLAB® code. It supports most of the MATLAB language and a wide range of toolboxes. You can integrate the generated code into your projects as source code, static libraries, or dynamic libraries. You can also use the generated code within the MATLAB environment to accelerate computationally intensive portions of your MATLAB code. MATLAB Coder lets you incorporate legacy C code into your MATLAB algorithm and into the generated code.

By using MATLAB Coder with Embedded Coder®, you can further optimize code efficiency and customize the generated code. You can then verify the numerical behavior of the generated code using software-in-the-loop (SIL) and processor-in-the-loop (PIL) execution.


MATLAB Language and Toolbox Support for Code Generation

Generate code from a broad range of MATLAB language features that are used for developing algorithms as components of larger systems.

Learn more

Use Cases for MATLAB Coder

Generate readable and portable C/C++ code.

Learn more

Generating Code from MATLAB

Prepare your MATLAB algorithm for code generation by analyzing your code to propose data type and sizes for your inputs.

Learn more

MEX Function Generation for Code Verification and Acceleration

Call MEX functions to test and verify the compiled code back in MATLAB and accelerate the execution.

Learn more

Multicore-Capable Code Generation Using OpenMP

Generate multicore-capable code from parfor-loops.

Learn more

MATLAB Coder with Simulink Coder and Embedded Coder

Use Simulink Coder and Embedded Coder to extend the capabilities of MATLAB Coder.

Learn more

Product Resources

Discover more about MATLAB Coder by exploring these resources.


Explore documentation for MATLAB Coder functions and features, including release notes and examples.


Browse the list of available MATLAB Coder functions.

System Requirements

View system requirements for the latest release of MATLAB Coder.

Technical Articles

View articles that demonstrate technical advantages of using MATLAB Coder.

User Stories

Read how MATLAB Coder is accelerating research and development in your industry.

Community and Support

Find answers to questions and explore troubleshooting resources.

Hardware Support

Connect MATLAB Coder to hardware platforms.

Supported Functions

Browse the list of available MATLAB Coder functions.


MATLAB Coder apps enable you to quickly access common tasks through an interactive interface.

Try or Buy

Get a Free Trial

Test drive MATLAB Coder.

Get a trial

Ready to Buy?

Purchase MATLAB Coder and explore related products.

Contact sales
Pricing and licensing

Have Questions?


Contact Bill Chou,
MATLAB Coder Technical Expert

Email Bill

MATLAB Coder requires: MATLAB

Related Solutions

Use MATLAB Coder to solve scientific and engineering challenges:

News and Events

Use MATLAB Coder to generate readable and portable C code from your MATLAB algorithms to integrate into other applications outside MATLAB. Accelerate your MATLAB algorithms within MATLAB by generating MEX files.
Generate readable & portable C code from MATLAB algorithms and integrate it into an iPhone, iPad, or Android app.

Free Quick Start Guide