Get Started withMATLABCoder
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 Coderprovides 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, useMATLAB Compiler™. To generate software components for integration with other programming languages, useMATLAB Compiler SDK™.
Tutorials
- Generate C Code by Using the MATLAB Coder App
Generate C/C++ code from MATLAB code by using theMATLAB Coder应用程序。
- Generate C Code at the Command Line
Generate C/C++ code from MATLAB code by using the
codegen
command. - Accelerate MATLAB Algorithm by Generating MEX Function
Generate a MEX function from a MATLAB function by using the
codegen
command.
About Code Generation fromMATLABAlgorithms
- Code Generation Workflow
Workflow for MEX and standalone C/C++ code generation.
- Input Type Specification for Code Generation
How input type specification affects the generated C/C++ code.
- Differences in Appearance of Generated Code and MATLAB Code
How generated code appears different from MATLAB code due to optimizations made by the code generator.