Main Content

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

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
savefiprefSave fi preferences for next MATLAB session
isfipref确定输入是否为 fipref 对象
lowerboundfi 对象范围的下界
lsbfi 对象的最低有效位的定标,或 quantizer 对象的最低有效位的值
rangefiquantizer 对象的数值范围
upperboundfi 对象范围的上界
sortSort elements of real-valued fi object in ascending or descending order
fixed.aggregateTypeCompute aggregate numerictype
getProperty values of object
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将对象重置为初始条件
setSet or display property values for quantizer objects
mat2str将矩阵转换为字符串
tostringfifimathnumerictypequantizer 对象转换为字符串

numerictypeConstruct an embedded.numerictype object describing fixed-point or floating-point data type

主题

构造定点数值对象

定点数学设置

定点预设项

数值类型信息

应用领域

疑难解答

Resolve Error: Mismatched fimath

Troubleshoot mismatched fimath errors.

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

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

解决错误:fi* 非 fi

fi*fi 错误故障排除。

fi Constructor Does Not Follow globalfimath Rules

Troubleshoot getting the fi constructor to follow globalfimath rules.