help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

converting int 2 real and vice versa


From: Daniel Heiserer
Subject: converting int 2 real and vice versa
Date: Fri, 28 Aug 1998 16:56:50 +0200

Hi,
I would like to convert integers to real and vice versa.
That looks strange for somebody working with octave which handles only
doubles.
The background is the following.

I have a binary-file  containing 4 byte words integers and floats. 
I want to read it in with ONE fread command (!performance) into an
integer stream.
Of course not all are integers, most of them are floats. In C you can
find that easily out by just looking at the value: I know that
everything which is bigger than a certain value and smaller than that
value represents a float. In Fortran I can share the stack via a COMMON
definition or in C I can do similar things with pointers or units. So I
can get the float value out of the integer value and vice versa. 
Can I "transform" octaves data with a similar command?

double-->double by flipping the bytes how it is needed??

Bye Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]