Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

show floating point binary

Status
Not open for further replies.

Gupp

Electrical
Dec 17, 2005
1
I'm doing some work in Matlab that requires the analysis (and modification) of numbers on a bit level.
I want to convert numbers like this: -0.00300634
into it's double-precision floating point binary representation (1 bit sign, 11 bit exponent, 52 bit mantissa) so I can perform hamming distance calculations as well as modify certain bits in the sequence. I know that Matlab stores and performs arithmetic on numbers in this format so I was wondering if there exists functions that allow this sort of thing to be done.
 
Replies continue below

Recommended for you

If you are running v7.1, try the new typecast() function.

>> format hex
>> typecast(-0.00300634,'uint64')

ans =

bf68a0c07f618a09

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor