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®.


expand all

fiConstruct fixed-point numeric object
sfiConstruct signed fixed-point numeric object
ufiConstruct unsigned fixed-point numeric object
fimathSet fixed-point math settings
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
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
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


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


Construct Fixed-Point Numeric Objects

Create Fixed-Point Data in MATLAB

Fixed point basics.

Performing Fixed-Point Arithmetic

Performing fixed-point arithmetic.

View Fixed-Point Data

fi object display settings used in code examples.

Ways to Construct fi Objects

Creation of fi objects.

Fixed-Point Versus Built-in Integer Types

Differences between fixed-point data types and built-in integer data types in MATLAB®.

fi Object Functions

Functions that operate directly on fi objects.

fi Object Properties

Defines the fi object properties.

Fixed-Point Math Settings

fimath Object Construction

Creation of fimath objects.

fimath Object Properties

Properties and property settings associated with fimath objects.

fimath Properties Usage for Fixed-Point Arithmetic

Fixed-point arithmetic using fimath objects to control the results.

fimath for Sharing Arithmetic Rules

Using a fimath object to share modular arithmetic information among multiple fi objects.

fimath for Rounding and Overflow Modes

Order setting for overflow action and rounding method.

fimath ProductMode and SumMode

Differences among the different settings of the ProductMode and SumMode properties.

How Functions Use fimath

Functions that ignore or discard fimath.

Fixed-Point Preferences

Set fi Object Display Preferences Using fipref

Examples of using fipref objects to set display preferences for fi objects.

Data Type Override Preferences Using fipref

Data type override using the fipref object.

Underflow and Overflow Logging Using fipref

Examples of using fipref objects to set logging preferences for fi objects.

Numeric Type Information

numerictype Object Construction

Construction of numerictype objects.

numerictype Object Properties

Properties and property settings associated with numerictype objects.

numerictype of Fixed-Point Objects

Fields and settings for the numerictype object.

numerictype Objects Usage to Share Data Type and Scaling Settings of fi objects

Example of using a numerictype object to share modular data type and scaling information among multiple fi objects.


Fixed-Point Design Exploration in Parallel

This example shows how to explore and test fixed-point designs by distributing tests across many computers in parallel.

Real-Time Image Acquisition, Image Processing, and Fixed-Point Blob Analysis for Target Practice Analysis

Acquire real-time images from a webcam, process the images using fixed-point blob analysis, and determine world coordinates to score target practice using a laser pistol.

Fixed-Point Filter Design in MATLAB (DSP System Toolbox)

This example shows how to design filters for use with fixed-point input.


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