Main Content

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

MATLAB 中的自动定点转换

使用定点转换器转换为定点

定点转换器使您能够将浮点 MATLAB® 代码转换为定点 MATLAB 代码。

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

App

定点转换器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.inline控制生成的代码中特定函数的内联
coder.load从 MAT 文件或 ASCII 文件加载编译时常量
coder.newtypeCreate coder.Type object to represent type of an entry-point function input
coder.nullcopy在代码生成中声明未初始化的变量
coder.resize调整 coder.Type 对象的大小
coder.target确定代码生成目标是否为指定的目标
coder.typeofCreate coder.Type object to represent the type of an entry-point function input
coder.unroll通过为每次循环迭代生成循环体的副本来展开 for 循环
coder.varsize声明可变大小数据

coder.mexconfigCode acceleration configuration object for use with fiaccel
coder.FixPtConfigFloating-point to fixed-point conversion configuration object
coder.ArrayTypeRepresent set of MATLAB arrays acceptable for input specification
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.StructTypeRepresent set of MATLAB structure arrays acceptable for input specification
coder.Type表示输入设定可接受的一组 MATLAB

主题

自动定点转换工作流

建议定点类型

转换为定点

验证定点转换

支持的语言功能

命令行工作流

疑难解答

Generated Fixed-Point Code

Avoid issues with generated fixed-point code.

Data Type Issues in Generated Code

Highlight potential data type issues in report.

Debug Numerical Issues in Fixed-Point Conversion Using Variable Logging

Learn how to debug your fixed-point code when you need more than out of the box conversion.

Why Does the Fixed-Point Converter App Not Propose Data Types for System Objects?

Troubleshoot missing data type proposals for System objects.

Slow Operations in the Fixed-Point Converter App

Determine whether code generation readiness screening is causing slow operations in the app.