Quantcast
Channel: MATLAB Central Newsreader - converting int to float
Viewing all articles
Browse latest Browse all 7

Re: converting int to float

$
0
0
I guess I need to rephrase the question. With the fread command, if I
tell it to read in an int8, it reads 8 bits and stores it in matlab as
a double. But to create what fread would read when given the double
option would require 64 bits. Is there an exisiting function to
combine 4 8-bit words and interpret them as a double?

If I understand it correctly, the conversion of matlab type double to
say matlab type uint8 is simply to save memory, which is not what I am
after.

Thanks,
Brett

On Tue, 19 Feb 2002 13:26:06 -0500, Jordan Rosenthal <jr@ll.mit.edu>
wrote:

>Brett,
>
>You can use the DOUBLE command to convert from something (such as UINT8)
>to doubles.
>
>Jordan
>
>Brett wrote:
>
>> Perhaps this question has been answered, but I wasn't able to find it.
>> Supose I read in 4 numbers of int8, but then realize that this should
>> be a float. Is there an easy way to do this?
>>
>> Thanks,
>> Brett
>

Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images