主要内容

MATLAB 中创建定点对象

使用 finumerictype 创建定点数据

您可以使用 Fixed-Point Designer™ fi 对象创建定点数据。在 fi 构造函数中,您可以指定 numerictypefimath 属性。每个 fi 对象都有关联的 numerictype 对象。numerictype 对象存储关于 fi 对象的信息,包括字长、小数长度和符号性。numerictype 对象相当于 Simulink® 中的 fixdt 对象。

函数

全部展开

fi构造定点数值对象
fimath设置定点数学设置
fixed.fimathLikeReturn fimath object like the input (自 R2022b 起)
globalfimathConfigure global fimath and return handle object
removefimathRemove fimath from fi object
removeglobalfimathprefRemove global fimath preference
resetglobalfimathSet global fimath to MATLAB factory default
setfimathAttach fimath object to fi object
fiprefSet fixed-point preferences
savefipref保存 fi 预设项以用于下一个 MATLAB 会话
isfipref确定输入是否为 fipref 对象
lowerboundfi 对象范围的下界
lsbfi 对象的最低有效位的定标,或 quantizer 对象的最低有效位的值
rangefiquantizer 对象的数值范围
upperboundfi 对象范围的上界
sort按升序或降序对实数值 fi 对象的元素进行排序
fixed.aggregateTypeCompute aggregate numerictype
get对象的属性值
isequalDetermine whether real-world values of two fi objects are equal, or determine whether properties of two fimath, numerictype, or quantizer objects are equal
isequalnDetermine equality of fixed-point arrays, treating NaN values as equal (自 R2021a 起)
reset将对象重置为初始条件
set设置或显示 quantizer 对象的属性值
mat2str将矩阵转换为字符串
tostringfifimathnumerictypequantizer 对象转换为字符串

numerictype构造描述定点或浮点数据类型的 embedded.numerictype 对象

主题

构造定点数值对象

定点数学设置

定点预设项

数值类型信息

应用领域

疑难解答

解决错误:不匹配的 fimath

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

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

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

解决错误:fi* 非 fi

fi*fi 错误故障排除。

fi Constructor Does Not Follow globalfimath Rules

Troubleshoot getting the fi constructor to follow globalfimath rules.

精选示例