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.

Funzioni

espandi tutto

Array Creation

colon, :Create 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
vertcatConcatenate fi object arrays vertically

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

Linear System Solvers and Matrix Factorizations

fixed.backwardSubstituteSolve upper-triangular system of equations through backward substitution (Da R2020b)
fixed.forwardSubstituteSolve lower-triangular system of equations through forward substitution (Da R2020b)
fixed.jacobiSVDFixed-point Jacobi singular value decomposition (Da R2023a)
fixed.qlessQRQ-less QR decomposition (Da R2020b)
fixed.qlessQRUpdateUpdate QR factorization (Da R2020b)
fixed.qrABCompute C = Q'B and upper-triangular factor R (Da R2020b)
fixed.qrMatrixSolveSolve system of linear equations Ax = B for x using QR decomposition (Da R2020b)
fixed.qlessQRMatrixSolveSolve system of linear equations (A'A)X = B for X using Q-less QR decomposition (Da R2020b)
fixed.svdFixed-point Golub-Kahan-Reinsch singular value decomposition (Da R2022b)
svdFixed-point Golub-Kahan-Reinsch singular value decomposition (Da R2022b)

Specialized Matrices

toeplitzCreate Toeplitz matrix
cordicsigmoidCORDIC-based approximation of sigmoid activation (Da R2023b)
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 (Da R2020a)
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
ceilDivRound the result of division toward positive infinity (Da R2021a)
convConvolution and polynomial multiplication of fi objects
cosCosine of fi object in radians
divideDivide two fi objects
fixDivRound the result of division toward zero (Da R2021a)
floorDivRound the result of division toward negative infinity (Da R2021a)
mpyMultiply two objects using fimath object
nearestDivRound the result of division toward the nearest integer (Da R2021a)
nnzNumber of nonzero elements in fi object (Da R2020b)
normalizedReciprocalCompute normalized reciprocal (Da R2020a)
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
dec2baseConvert decimal integer to its base-n representation for fi objects (Da R2021b)
dec2binConvert decimal integer to its binary representation for fi objects (Da R2021b)
dec2hexConvert decimal integer to its hexadecimal representation for fi objects (Da R2021b)
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 are equal
geDetermine whether real-world value of one array is greater than or equal to another
gtDetermine whether real-world value of one array is greater than another
leDetermine whether real-world value of one array is less than or equal to another
ltDetermine whether real-world value of one array is less than another
neDetermine whether real-world values of two arrays 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
modByConstantModulus after division by a constant denominator (Da R2021a)
errmeanMean of quantization error
errpdfProbability density function of quantization error
errvarVariance of quantization error
logreportQuantization report
maxlogLog maximums
minlogLog minimums
noperationsNumber of quantization operations by quantizer object
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