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 and Matrix Operations
Array Creation
colon | Create vectors, array subscripting |
eye | Create identity matrix with fixed-point properties |
ones | Create array of all ones with fixed-point properties |
zeros | Create array of all zeros with fixed-point properties |
Array and Matrix Manipulation
horzcat | Concatenate multiple fi objects horizontally |
sort | Sort elements of real-valued fi object in ascending or descending
order |
subsasgn | Subscripted assignment |
subsref | Subscripted reference |
vertcat | Vertically concatenate multiple fi objects |
Basic Array and Matrix Information
isequivalent | Determine if two numerictype objects
have equivalent properties |
isfloat | Determine whether input is floating-point data type |
max | Largest element in array of fi objects |
min | Smallest element in array of fi objects |
numel | Number of data elements in fi array |
Array and Matrix Operators
ctranspose | Complex conjugate transpose of fi object |
minus | Matrix difference between fi objects |
mpower | Fixed-point matrix power (^) |
mrdivide | Right-matrix division |
mtimes | Matrix product of fi objects |
plus | Matrix sum of fi objects |
qr | Orthogonal-triangular decomposition |
rdivide | Right-array division |
shiftdata | Shift data to operate on specified dimension |
sum | Sum of fi array elements |
times | Element-by-element multiplication of fi objects |
uminus | Negate elements of fi object array |
unshiftdata | Inverse of shiftdata |
Specialized Matrices
Complex Math
abs | Absolute value of fi object |
complex | Construct complex fi object from real and imaginary
parts |
conj | Complex conjugate of fi object |
sign | Perform sign function (signum function) on array |
Constants
eps | Quantized relative accuracy for fi or
quantizer objects |
intmax | Largest positive stored integer value representable by numerictype of fi object |
intmin | Smallest stored integer value representable by numerictype of fi object |
Exponentials
nextpow2 | Exponent of next higher power of 2 of fi object |
pow2 | Efficient fixed-point multiplication by 2K |
power | Fixed-point element-wise power |
sqrt | Square root of fi object |
Math Operations
accumneg | Subtract two fi objects or values |
accumpos | Add two fi objects or values |
add | Add two fi objects using fimath
object |
atan2 | Four-quadrant inverse tangent of fixed-point values |
conv | Convolution and polynomial multiplication of fi
objects |
cos | Cosine of fi object |
divide | Divide two fi objects |
innerprodintbits | Number of integer bits needed for fixed-point inner product |
mpy | Multiply two objects using fimath object |
nnz | Number of nonzero elements in fi object |
normalizedReciprocal | Compute normalized reciprocal |
sin | Sine of fixed-point values |
sqrt | Square root of fi object |
sub | Subtract two fi objects using fimath
object |
Radix Conversion
bin | Unsigned binary representation of stored integer of fi
object |
bin2num | Convert two's complement binary string to number using quantizer
object |
dec | Unsigned decimal representation of stored integer of fi
object |
hex | Hexadecimal representation of stored integer of fi
object |
hex2num | Convert hexadecimal string to number using quantizer object |
num2bin | Convert number to binary representation using quantizer
object |
num2hex | Convert number to hexadecimal equivalent using quantizer
object |
num2int | Convert number to signed integer using quantizer
object |
oct | Octal representation of stored integer of fi object |
sdec | Signed decimal representation of stored integer of fi object |
Relational Operators
eq | Determine whether real-world values of two fi objects
are equal |
ge | Determine whether real-world value of one fi object
is greater than or equal to another |
gt | Determine whether real-world value of one fi object
is greater than another |
le | Determine whether real-world value of fi object
is less than or equal to another |
lt | Determine whether real-world value of one fi object
is less than another |
ne | Determine whether real-world values of two fi objects
are not equal |
Rounding and Remainders
Rounding Functions
ceil | Rounds toward positive infinity |
convergent | Round toward nearest integer with ties rounding to nearest even integer |
fix | Round toward zero |
floor | Round toward negative infinity |
nearest | Round toward nearest integer with ties rounding toward positive
infinity |
round | Round fi object toward nearest integer or round input data using
quantizer object |
Modulus and Remainder Functions
mod | Modulus after division for fi objects |