fi
Double-precision floating-point real-world value of fi object
b = double(a)
example
b = double(a) returns the real-world value of a fi object in double-precision floating point format.
b
a
Fixed-point numbers can be represented as
real-world value=2−fraction length×stored integer
or, equivalently as
real-world value=(slope×stored integer)+bias
collapse all
Create a signed fi object with values -1 and 1, a word length of 8 bits, and a fraction length of 7 bits.
-1
1
a = fi([-1 1], 1, 8, 7)
a=1×2 object -1.0000 0.9922 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 8 FractionLength: 7
Find the double-precision floating-point real-world value of the stored integers of fi object a.
b = 1×2 -1.0000 0.9922
Stored integer, specified as a fi object.
Data Types: fi
single
You have a modified version of this example. Do you want to open this example with your edits?