comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » converting ieee-float-format to pw-wave-float-format
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: converting ieee-float-format to pw-wave-float-format [message #2676 is a reply to message #2667] Wed, 24 August 1994 08:38 Go to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
SLAMECZKA,MICHAEL (SLAMECZKA@EZINFO.VMSMAIL.ETHZ.CH) wrote:
: Hi everybody!!

: My problem is the following:

: I have an 4 byte float in the ieee-format and should convert it into the
: pw_wave-format.

There's a difference?

: To do so, I had to shift the byte by 2, that means:
: byte1 byte2 byte3 byte4 had to be shifted:

: --> byte3 byte4 byte1 byte2

: in pw_wave I do the following

: readu,1,flo
: print,flo ---> byte3 byte4 byte1 byte2
: print,float(flo,0) ---> floaatingpointnumber

Ah, maybe you need to byteswap your data (did you transfer it from one
CPU type to another?) Try the BYTEORDER command. From your
description, I think you need BYTEORDER, /LSWAP.


: now my problem realy starts:
: the result is only one quarter of the originally number, that means, if I had
: a 10 then i get as result in pw_wave 2.5!!!

Never seen this!

: thanks a lot


Hope this helps,

Peter
[Message index]
 
Read Message
Read Message
Previous Topic: Cursor color????
Next Topic: Smith Charts in IDL/PV-WAVE?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 17:13:23 PDT 2025

Total time taken to generate the page: 0.16193 seconds