fi objects using
fiObjects Overriding Their
a = fi(pi); b = fi(exp(1)); F = fimath('SumMode','SpecifyPrecision',... 'SumWordLength',32,'SumFractionLength',16); c = sub(F,a,b)
c = 0.4233 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 32 FractionLength: 16
c is the 32-bit difference of
b, with fraction length 16.
fimath object to use for subtraction, specified as a
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 = sub(F,A,B)
C = F.sub(A,B)
is equivalent to
A.fimath = F; B.fimath = F; C = A - B;
Bare not modified when you use the functional form.
Usage notes and limitations:
Code generation does not support the syntax
must use the syntax