Main Content

stripscaling

Stored integer of fi object

Syntax

I = stripscaling(a)

Description

I = stripscaling(a) returns the stored integer of a as a fi object with binary-point scaling, zero fraction length and the same word length and sign as a.

Examples

stripscaling is useful for converting the value of a fi object to its stored integer value.

fipref('NumericTypeDisplay','short', ...
       'FimathDisplay','none');
format long g
a = fi(0.1,true,48,47)
a = 

         0.100000000000001
      numerictype(1,48,47)
b = stripscaling(a)
b = 

            14073748835533
      numerictype(1,48,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.

Version History

Introduced before R2006a