| Fixed-Point Toolbox™ | ![]() |
I = stripscaling(a)
I = stripscaling(a) returns the stored integer of a as a fi object with zero bias and the same word length and sign as a.
Stripscaling is useful for converting the value of a fi object to its stored integer value without changing any other parameters.
fipref('NumericTypeDisplay','short', ...
'FimathDisplay','none');
format long g
a = fi(0.1,true,48,47)
a =
0.100000000000001
s48,47
b = stripscaling(a)
b =
14073748835533
s48,0
bin(a)
ans =
000011001100110011001100110011001100110011001101
bin(b)
ans =
000011001100110011001100110011001100110011001101
Notice that the stored integer values of a and b are identical, while their real-world values are different.
![]() | streamtube | sub | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |