MATLAB Coder generates C and C++ code from MATLAB code for a variety of hardware platforms, from desktop systems to embedded hardware. 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. The generated code is readable and portable. You can combine it with key parts of your existing C and C++ code and libraries. You can also package the generated code as a MEX-function for use in MATLAB.
When used with Embedded Coder, MATLAB Coder provides code customizations, target-specific optimizations, code traceability, and software-in-the-loop (SIL) and processor-in-the-loop (PIL) verification.
To deploy MATLAB programs as standalone applications, use MATLAB Compiler. To generate software components for integration with other programming languages, use MATLAB Compiler SDK.
Run Anywhere
Use any C/C++ compiler to compile and run your generated code on any hardware, from desktop systems to mobile devices to embedded hardware. The generated code is royalty-free—deploy it in commercial applications to your customers at no charge.
Use Functions from Toolboxes
Use the MATLAB Coder app or equivalent command-line functions to generate code for your signal processing, computer vision, deep learning, control systems, or other application using MATLAB and Simulink products.
Prototype on Embedded Hardware
Get to hardware fast with automatic conversion of your algorithm to C/C++. Target any device by manually integrating the generated code with your application. Automate the process for Raspberry Pi using MATLAB Support Package for Raspberry Pi.
Deploy C++ Code from MATLAB
Generate C++ classes from classes in your MATLAB code, including value classes, handle classes, and system objects. Compile the generated code into C++ libraries or executables and integrate them into your existing C++ source code.
Optimize the Generated Code
Generate multicore OpenMP code and call optimized libraries such as LAPACK, BLAS, and FFTW. Use with Embedded Coder to generate processor-specific intrinsic code that can execute faster than standard ANSI/ISO C/C++ code.
Deploy Deep Learning Networks and Machine Learning Models
Deploy a variety of trained networks such as ResNet-50, MobileNet-v2, support vector machine (SVM) models, and decision tree models, along with preprocessing and postprocessing logic, to any CPU, including chips based on Intel® and ARM® Cortex®.
Integrate with Software
Reuse MATLAB algorithms as C/C++ source code or libraries within your software environment. Generated code uses C/C++ types in a natural way, simplifying integration with external code. Automatically call trusted C/C++ from generated code.
Reuse MATLAB Tests on Generated Code
Reuse existing MATLAB tests to verify the behavior of generated code in the interactive MATLAB environment. Use the MATLAB unit test framework to quickly develop a rich set of regression tests that can be used to verify the generated C/C++ code.
Accelerate Algorithms
Call generated code as MEX functions from your MATLAB code to speed execution. Profile generated MEX functions to identify bottlenecks and focus your optimization efforts.
Product Resources:
“MATLAB, MATLAB Coder, and Fixed-Point Designer enabled our small team to develop a complex real-time signal processing algorithm, optimize it to reduce power and memory requirements, accelerate embedded code implementation, and perform the rigorous testing required for medical device validation.”
Get a Free Trial
30 days of exploration at your fingertips.
Request More Information
Let us know how we can help you.