主要内容

MATLAB 代码准备

在代码生成之前识别并修复 MATLAB® 代码中的问题

要从 MATLAB 代码成功生成 C/C++ 代码,需要遵循代码生成规则和限制。例如,您的 MATLAB 代码只能使用代码生成支持的函数和对象。要在生成 C/C++ 代码之前识别和修复 MATLAB 代码的问题,您可以使用代码分析器和代码生成就绪工具进行检查。

函数

coder.screener确定函数是否适合代码生成
getLineColumnFind locations of beginning and end of MATLAB code involved in code generation
textReportExport code generation readiness report to base workspace as a character vector (自 R2022a 起)

属性

coder.CallSite Properties Information about a function call site in your MATLAB code (自 R2022a 起)
coder.CodeFile PropertiesDescription of file containing text that is involved in code generation
coder.File PropertiesDescription of file without text that is involved in code generation
coder.Message PropertiesDescription of message produced during code generation readiness analysis or during code generation
coder.ScreenerInfo PropertiesCode generation readiness information (自 R2022a 起)

主题

准备代码生成

故障排除