Main Content

MATLAB 中创建定点对象

使用 finumerictype 创建定点数据

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

函数

全部展开

fi构造定点数值对象
sfiConstruct signed fixed-point numeric object
ufiConstruct unsigned fixed-point numeric object
fimathSet fixed-point math settings
fixed.fimathLikeReturn fimath object like the input
globalfimathConfigure global fimath and return handle object
removefimathRemove fimath object 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
isfiprefDetermine whether input is fipref object
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
reset将对象重置为初始条件
setSet or display property values for quantizer objects
mat2str将矩阵转换为字符串
tostringConvert fi, fimath, numerictype, or quantizer object to string

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

主题

构造定点数值对象

定点数学设置

定点预设项

数值类型信息

应用领域

疑难解答

Resolve Error: Mismatched fimath

Troubleshoot mismatched fimath errors.

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

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

Resolve Error: fi*non-fi

Troubleshoot fi*non-fi errors.

fi Constructor Does Not Follow globalfimath Rules

Troubleshoot getting the fi constructor to follow globalfimath rules.