Main Content

MATLAB Coder

Generate C and C++ code fromMATLABcode

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™.

Get Started

Learn the basics of MATLAB Coder

MATLAB Programming for Code Generation

MATLAB language syntax and functions for code generation; data definition

Code Generation

C/C++ and MEX code generation, fixing errors, behavioral verification

Deployment

Using and running the generated C/C++ code

Performance

Reduce code generation time, improve execution speed, reduce memory usage of generated code

MATLAB Algorithm Acceleration

Acceleration using generated MEX functions

Numeric Conversion

固定点转换,单精度转换(需要固定点设计器™)

Deep Learning with MATLAB Coder

为深度学习神经网络生成C ++代码(需要深入学习工具箱™)

MATLAB Coder Supported Hardware

Support for third-party hardware


Check Bug Reports for Issues and Fixes

Software is inherently complex and is not free of errors. The output of a code generator might contain bugs, some of which are not detected by a compiler. MathWorks reports critical known bugs brought to its attention on its Bug Report system atwww.tianjin-qmedu.com/support/bugreports/. In the search bar, type the phrase "Incorrect Code Generation" to obtain a report of known bugs that produce code that might compile and execute, but still produce wrong answers. To save a search, click Save Search.

错误报告是每个版本的文档的一个组成部分。定期检查释放的所有错误报告,因为此类报告可以识别您使用的发布的实际行为和本文档中描述的行为之间的不一致。

In addition to reviewing bug reports, you should implement a verification and validation strategy to identify potential bugs in your design, code, and tools.

Search R2021b Bug Reports

Known Bugs for Incorrect Code Generation
All Known Bugs for This Product