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

Home » Public Forums » archive » Slightly incorrect values using readf on a plain text file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Slightly incorrect values using readf on a plain text file [message #85289] Mon, 22 July 2013 11:23 Go to previous message
Meg is currently offline  Meg
Messages: 7
Registered: May 2013
Junior Member
I am trying to read the columns of a text file. All of the MET values come in slightly wrong in the one's place. Does anyone have a suggestion on how to fix this problem?

Code:

openr,dat,'/users/username/desktop/dataset2.txt',/get_lun
ph2=((em2=(inc2=(error=(numpt=(ph1=(em1=((inc1=(iof = dblarr(9999)))))))))))
met= lindgen(9999)
i=0

while not eof(dat) do begin
readf,dat,c1, c2, c3, c4, c5, c6, c7, c8, c9, c10
iof(i)=c1
inc1(i)=c2
em1(i)=c3
ph1(i)=c4
numpt(i)=c5
error(i)=c6
inc2(i)=c7
em2(i)=c8
ph2(i)=c9
met(i)=c10

i=i+1
endwhile
free_lun,dat

in=where(iof ne 0 and inc1 ne 0)
iof=iof(in)
inc1=inc1(in)
em1=em1(in)
ph1=ph1(in)
numpt=numpt(in)
error=error(in)
inc2=inc2(in)
em2=em2(in)
ph2=ph2(in)
met=met(in)
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Inconsistent problem of HDF I/O
Next Topic: Re: Fatal error when opening an image file

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

Current Time: Fri Oct 10 10:54:09 PDT 2025

Total time taken to generate the page: 1.68005 seconds