MATLAB 中的定点代码生成
要生成代码,您必须拥有 MATLAB Coder 产品。有关代码生成的信息,请参阅 MATLAB Coder 文档。
主题
- Ways to Generate Code
Discusses using Fixed-Point Designer™ software with code generation.
- Workflow for Fixed-Point Code Acceleration and Generation
Describes the steps required for preparing MATLAB code and converting it to a MEX function.
- Functions Supported for Code Acceleration or C Code Generation
Lists the Fixed-Point Designer features supported by code generation from MATLAB.
- 使用 MATLAB Coder 进行代码生成
向您介绍 MATLAB Coder 产品。
- 结构体和数组中常量的代码生成
有时代码生成器无法识别常量结构体字段或数组元素。
- Avoid Multiword Operations in Generated Code
This example shows how to avoid multiword operations in generated code by using the
accumposfunction instead of simple addition in your MATLAB algorithm. - Find Potential Data Type Issues in Generated Code
Highlight potential data type issues in report.
疑难解答
如果您的 C 编译器报告运行时堆栈溢出,请将最大堆栈使用量参数的值设置为小于可用堆栈大小。创建一个命令行配置对象 coder.mexconfig,然后设置 StackUsageMax 参数。
Tips for Making Generated Code More Efficient
Describes techniques which can be used to make generated code more efficient.
仿真和代码生成支持的数据类型。