MATLAB Code Preparation
Identify and fix issues in MATLAB® code prior to code generation
Successful C/C++ code generation from MATLAB code depends on compliance with code generation rules and limitations. For example, your MATLAB code must only use functions and objects that are supported for code generation. To identify and fix issues with your MATLAB code prior to C/C++ code generation, you can use the Code Analyzer and the code generation readiness tool.
Functions
coder.screener | Determine if function is suitable for code generation |
getLineColumn | Find locations of beginning and end of MATLAB code involved in code generation |
textReport | Export code generation readiness report to base workspace as a character vector (Since R2022a) |
Properties
| coder.CallSite Properties | Information about a function call site in your MATLAB code (Since R2022a) |
| coder.CodeFile Properties | Description of file containing text that is involved in code generation |
| coder.File Properties | Description of file without text that is involved in code generation |
| coder.Message Properties | Description of message produced during code generation readiness analysis or during code generation |
| coder.ScreenerInfo Properties | Code generation readiness information (Since R2022a) |
Topics
Prepare for Code Generation
- Identify Entry-Point Functions and Check MATLAB Code
Identify entry-point functions and check MATLAB code for errors before code generation. - Code Generation Readiness Tool
The code generation readiness tool screens MATLAB code for features and functions that code generation does not support.
Troubleshooting
- Resolve Error: Function Is Not Supported for Code Generation
Troubleshoot code generation failure of unsupported MATLAB functions.