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

Home » Public Forums » archive » reading xyz-data from ascii-file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
reading xyz-data from ascii-file [message #19691] Thu, 13 April 2000 00:00
J�rg Schliwa is currently offline  J�rg Schliwa
Messages: 12
Registered: April 2000
Junior Member
Hy Folks!

I've got a problem x,y,z-koordinates from a ascii-file. The file looks like
this:
500338.29 500246.22 4
500341.32 500210.1 4
500344.12 500243.24 6.5
...
The problem is, when I read the data, IDL rounds the values!
The programcode is:
filename=dialog_pickfile(/read)

openr, lun, filename, /Get_Lun

While not eof(lun) Do Begin
readf, lun, egal
zeilen=zeilen+1
endwhile

Point_Lun, lun, 0

temp1=0.0
temp2=0.0
temp3=0.0

x=fltarr(zeilen)
y=fltarr(zeilen)
z=fltarr(zeilen)

For j=0, zeilen-1 Do Begin
readf, lun, temp1, temp2, temp3
x[j]=temp1
y[j]=temp2
z[j]=temp3
endfor

After running this code, x[0] is 500338. instead of 500338.29
Does anybody know why IDL does round the values?

Thanks, J�rg
Germany
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: reading xyz-data from ascii-file
Next Topic: Re: Breakdown of IDL 5.3 license manager after Update Linux

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

Current Time: Sat Oct 11 09:41:46 PDT 2025

Total time taken to generate the page: 1.35823 seconds