Main Content

Créer des objets à virgule fixe dans MATLAB

fi et numerictype pour la création de données à virgule fixe

Vous pouvez créer des données à virgule fixe à l’aide de l’objet Fixed-Point Designer™ fi. Dans le constructeur fi, vous pouvez spécifier les propriétés numerictype et fimath. Chaque objet fi a un objet numerictype associé. L’objet numerictype stocke les informations sur l’objet fi, telles que la longueur de mot, la longueur de la portion fractionnaire et le signe. L’objet numerictype est équivalent à l’objet fixdt dans Simulink®.

Fonctions

développer tout

fiConstruct fixed-point numeric object
fimathSet fixed-point math settings
fixed.fimathLikeReturn fimath object like the input (depuis 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
isfiprefDetermine whether input is fipref object
lowerboundLimite inférieure de la plage de l'objet fi
lsbScaling of least significant bit of fi object, or value of least significant bit of quantizer object
rangeNumerical range of fi or quantizer object
upperboundUpper bound of range of fi object
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 (depuis R2021a)
resetReset objects to initial conditions
setSet or display property values for quantizer objects
mat2strConvert matrix to string
tostringConvert fi, fimath, numerictype, or quantizer object to string

Classes

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

Rubriques

Construire des objets numériques à virgule fixe

Paramètres mathématiques à virgule fixe

Préférences de virgule fixe

Informations sur le type numérique

Applications

Résolution des problèmes

Resolve Error: Mismatched fimath

Troubleshoot mismatched fimath errors.

Resolve Error: Data Type Mismatch

Troubleshoot data type mismatch 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.