MATLAB Coder
Description
- Overview and Key Features
- MATLAB Language Subset for Code Generation
- Use Cases for MATLAB Coder
- Generating Code from MATLAB
- MATLAB Coder with Simulink Coder and Embedded Coder
Overview
MATLAB Coder™ generates standalone C and C++ code from MATLAB® code. The generated source code is portable and readable.MATLAB Coder supports a subset of core MATLAB language features, including program control constructs, functions, and matrix operations. It can generate MEX functions that let you accelerate computationally intensive portions of MATLAB code and verify the behavior of the generated code.
MATLAB Coder works with Simulink Coder™ and Embedded Coder™ to generate C code from Simulink® models that contain MATLAB code. The generated C code can be used for:
- Standalone execution
- Integration with other software
- Accelerating MATLAB algorithms
- Embedded implementation
Key Features
- ANSI/ISO compliant C and C++ code generation
- MEX function generation for fixed-point and floating-point math
- Project management tool for specifying entry points, input data properties, and other code-generation configuration options
- Static or dynamic memory allocation for variable-size data
- Code generation support for many functions and System objects in Communications System Toolbox™, DSP System Toolbox™, and Computer Vision System Toolbox™
- Support for common MATLAB language features, including matrix operations, subscripting, program control statements (if, switch, for, while), and structures

MATLAB Coder project manager interface (left) and code generation report (right) showing generated C code.


