Re: reading xyz-data from ascii-file [message #19689] |
Thu, 13 April 2000 00:00 |
Mirko Vukovic
Messages: 124 Registered: January 1996
|
Senior Member |
|
|
In article <8d45qe$no3$1@ac1.ewetel.de>,
"J�rg Schliwa" <joerg.schliwa@ewetel.net> wrote:
> 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?
round off? How about initializing egal to double precision.
Mirko
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|