Skip to Main Content Skip to Search
Product Documentation

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
      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.

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS