fi objects using
In this example,
c is the 32-bit sum of
b with a fraction length of 16.
a = fi(pi); b = fi(exp(1)); F = fimath('SumMode','SpecifyPrecision',... 'SumWordLength',32,'SumFractionLength',16); c = add(F,a,b)
c = 5.8599 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 32 FractionLength: 16
fimath object to use for addition.
Operands, specified as scalars, vectors, matrices, or multidimensional arrays.
b must both be
objects and must have the same dimensions unless one is a scalar. If either
b is scalar, then
the dimensions of the nonscalar object.
Complex Number Support: Yes
c = add(F,a,b)
a.fimath = F; b.fimath = F; c = a + b
but not identical. When you use
b are not modified, and the output
c, has no local
When you use the syntax
c = a + b, where
b have their own
fimath objects, the output
c, gets assigned the same
fimath object as inputs
Usage notes and limitations:
F.add(a,b) is not supported. You must use the syntax