Main Content

Create Fixed-Point Objects in MATLAB

fi and numerictype for fixed-point data creation

You can create fixed-point data using the Fixed-Point Designer™ fi object. Within the fi constructor, you can specify numerictype and fimath properties. Each fi object has an associated numerictype object. The numerictype object stores information about the fi object including word length, fraction length, and signedness. The numerictype object is equivalent to the fixdt object in Simulink®.

Functions

expand all

fiConstruct fixed-point numeric object
fimathSet fixed-point math settings
fixed.fimathLikeReturn fimath object like the input (Since 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
lowerboundLower bound of range of fi object
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 (Since 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

Topics

Construct Fixed-Point Numeric Objects

Fixed-Point Math Settings

Fixed-Point Preferences

Numeric Type Information

Applications

Troubleshooting

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.

Featured Examples