主要内容

MATLAB 中的手动定点转换

辅助浮点算法转换为定点算法

使用 buildInstrumentedMex 函数来对算法进行插桩,以记录所有命名变量和中间变量的最小值和最大值。使用 showInstrumentationResults 函数根据这些记录的值建议定点数据类型。

函数

全部展开

buildInstrumentedMexGenerate compiled C code function including logging instrumentation
showInstrumentationResultsResults logged by instrumented, compiled C code function
clearInstrumentationResultsClear results logged by instrumented, compiled C code function
fi构造定点数值对象
fimath设置定点数学设置
numerictype构造描述定点或浮点数据类型的 embedded.numerictype 对象
eye创建具有定点属性的单位矩阵
ones用定点属性创建全一数组
zeros创建具有定点属性的全零数组
cast将变量转换为不同数据类型
cast64BitFiToIntCast fi object types that can be exactly represented to a 64-bit integer data type
cast64BitIntToFiCast 64-bit integer types to an equivalent fi object type
castFiToIntCast fi object to equivalent integer data type
castFiToMATLABCast fi object type to an equivalent built-in MATLAB data type
castIntToFiCast an integer data type to equivalent fi type

主题

疑难解答

Resolve Error: Function Is Not Supported for Fixed-Point Conversion

Troubleshoot functions that are not supported for fixed-point conversion.

解决错误:fi* 非 fi

fi*fi 错误故障排除。

解决错误:数据类型不匹配

对数据类型不匹配错误进行故障排除。

解决错误:不匹配的 fimath

对不匹配的 fimath 错误进行故障排除。

精选示例