主要内容

本页翻译不是最新的。点击此处可查看最新英文版本。

MATLAB 中的自动定点转换

R2026a
使用 fiaccel 转换为定点

在命令行中使用 fiaccel 将浮点 MATLAB® 代码转换为定点 MATLAB 代码。

函数

fiaccelAccelerate fixed-point code or convert floating-point MATLAB code to fixed-point MATLAB code
coder.config为定点或单精度转换创建配置对象
coder.approximationCreate function replacement configuration object
coder.allowpcode从 P 代码文件控制代码生成
coder.const在生成的代码中将表达式折叠为常量
coder.extrinsic将函数声明为外部函数,并在 MATLAB 中执行它
coder.float2fixed.skipExclude functions from fixed-point conversion (自 R2024b 起)
coder.inline控制生成代码中当前函数的内联
coder.inlineCall在生成的代码中内联被调函数 (自 R2024a 起)
coder.load在代码生成时从 MAT 文件或 ASCII 文件加载常量
coder.newtypeCreate coder.Type object to represent type of an entry-point function input
coder.nonInlineCall防止在生成的代码中内联被调函数 (自 R2024a 起)
coder.nullcopy在生成的代码中声明未初始化的变量
coder.resize调整 coder.Type 对象的大小
coder.target确定代码生成目标是否为指定的目标
coder.typeof创建 coder.Type 对象来表示入口函数输入的类型
coder.unroll通过为每次循环迭代生成循环体的副本来展开 for 循环
coder.varsize解决大小不兼容性错误并声明上界

类

coder.mexconfigCode acceleration configuration object for use with fiaccel
coder.FixPtConfigFloating-point to fixed-point conversion configuration object
coder.ArrayType表示输入设定可接受的一组 MATLAB 数组
coder.ConstantSpecification of constant value for code generation
coder.EnumTypeRepresent set of MATLAB enumerations acceptable for input specification
coder.FiTypeRepresent set of MATLAB fixed-point arrays acceptable for input specification
coder.PrimitiveTypeRepresent set of logical, numeric, or character arrays acceptable for input specification
coder.StructType表示输入设定可接受的一组 MATLAB 结构体数组
coder.Type表示输入设定可接受的一组 MATLAB 值

主题

自动定点转换工作流

支持的语言功能

建议数据类型

函数逼近

可视化结果

转换常见算法和数据构造

疑难解答

Detect Overflows

Detect overflows at the command line.

Data Type Issues in Generated Code

Highlight potential data type issues in report.