Main Content

Fixed-Point Math Functions

MATLAB® functions that support fixed-point data types

Create and manipulate fixed-point matrices and arrays. Use arithmetic, linear algebra, trigonometric, statistics, and complex math functions that support fixed-point data types.

Functions

expand all

Array Creation

colonCreate vectors, array subscripting
eyeCreate identity matrix with fixed-point properties
onesCreate array of all ones with fixed-point properties
zerosCreate array of all zeros with fixed-point properties

Array and Matrix Manipulation

horzcatConcatenate multiple fi objects horizontally
sortSort elements of real-valued fi object in ascending or descending order
subsasgnSubscripted assignment
subsrefSubscripted reference
vertcatVertically concatenate multiple fi objects

Basic Array and Matrix Information

isequivalentDetermine if two numerictype objects have equivalent properties
isfloatDetermine whether input is floating-point data type
maxLargest element in array of fi objects
minSmallest element in array of fi objects
numelNumber of data elements in fi array

Array and Matrix Operators

ctransposeComplex conjugate transpose of fi object
minusMatrix difference between fi objects
mpowerFixed-point matrix power (^)
mrdivideRight-matrix division
mtimesMatrix product of fi objects
plusMatrix sum of fi objects
qrOrthogonal-triangular decomposition
rdivideRight-array division
shiftdataShift data to operate on specified dimension
sumSum of fi array elements
timesElement-by-element multiplication of fi objects
uminusNegate elements of fi object array
unshiftdataInverse of shiftdata

Specialized Matrices

toeplitzCreate Toeplitz matrix
absAbsolute value of fi object
complexConstruct complex fi object from real and imaginary parts
conjComplex conjugate of fi object
signPerform sign function (signum function) on array
epsQuantized relative accuracy for fi or quantizer objects
intmaxLargest positive stored integer value representable by numerictype of fi object
intminSmallest stored integer value representable by numerictype of fi object
nextpow2Exponent of next higher power of 2 of fi object
pow2Efficient fixed-point multiplication by 2K
powerFixed-point element-wise power
sqrtSquare root of fi object
accumnegSubtract two fi objects or values
accumposAdd two fi objects or values
addAdd two fi objects using fimath object
atan2Four-quadrant inverse tangent of fixed-point values
convConvolution and polynomial multiplication of fi objects
cosCosine of fi object
divideDivide two fi objects
innerprodintbitsNumber of integer bits needed for fixed-point inner product
mpyMultiply two objects using fimath object
nnzNumber of nonzero elements in fi object
normalizedReciprocalCompute normalized reciprocal
sinSine of fixed-point values
sqrtSquare root of fi object
subSubtract two fi objects using fimath object
binUnsigned binary representation of stored integer of fi object
bin2numConvert two's complement binary string to number using quantizer object
decUnsigned decimal representation of stored integer of fi object
hexHexadecimal representation of stored integer of fi object
hex2numConvert hexadecimal string to number using quantizer object
num2binConvert number to binary representation using quantizer object
num2hexConvert number to hexadecimal equivalent using quantizer object
num2intConvert number to signed integer using quantizer object
octOctal representation of stored integer of fi object
sdecSigned decimal representation of stored integer of fi object
eqDetermine whether real-world values of two fi objects are equal
geDetermine whether real-world value of one fi object is greater than or equal to another
gtDetermine whether real-world value of one fi object is greater than another
leDetermine whether real-world value of fi object is less than or equal to another
ltDetermine whether real-world value of one fi object is less than another
neDetermine whether real-world values of two fi objects are not equal

Rounding Functions

ceil Rounds toward positive infinity
convergentRound toward nearest integer with ties rounding to nearest even integer
fixRound toward zero
floorRound toward negative infinity
nearestRound toward nearest integer with ties rounding toward positive infinity
roundRound fi object toward nearest integer or round input data using quantizer object

Modulus and Remainder Functions

modModulus after division for fi objects
errmeanMean of quantization error
errpdfProbability density function of quantization error
errvarVariance of quantization error
logreportQuantization report
maxlogLog maximums
minlogLog minimums
noperationsNumber of operations
noverflowsNumber of overflows
nunderflowsNumber of underflows
resetlogClear log for fi or quantizer object
meanAverage or mean value of fixed-point array
medianMedian value of fixed-point array