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

Home » Public Forums » archive » accessing data from READ_ASCII
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
accessing data from READ_ASCII [message #39515] Wed, 26 May 2004 05:59 Go to previous message
Andreas Ernst is currently offline  Andreas Ernst
Messages: 14
Registered: July 2002
Junior Member
Hi,

I am today trying to read a file with formatted data,
which look like this:

0.0 SIGT2: 2.15D-01 1.75D-01 2.15D-01 2.13D-01 2.08D-01
2.10D-01 1.95D-01 2.08D-01 1.83D-01 1.56D-01 9.23D-02 2.08D-01
1.0 SIGT2: 2.15D-01 2.05D-01 2.18D-01 2.15D-01 2.11D-01
2.18D-01 2.16D-01 1.99D-01 1.91D-01 1.54D-01 9.04D-02 2.09D-01
2.0 SIGT2: 1.95D-01 2.46D-01 2.10D-01 2.48D-01 2.27D-01
2.17D-01 2.14D-01 2.05D-01 1.88D-01 1.54D-01 8.78D-02 2.33D-01

...

So the file contains basically 1500 lines with 14 columns of data,
from which the second column contains strings, which I don't need.
I tried to read it with the READ_ASCII routine, but I did not find
out how to acces the data structure afterwards. My code looks like
this:

sigc = FLTARR(till1)
sig=READ_ASCII(file1, num_records=till1)
sigc=REFORM(sig.(3))
PRINT, sigc[0]

till1 is 1500 in this case. sigc should contain the third
column of the data file, and as an example I would like to
print out the first datum in this column, which belongs to
the first row of data. I also tried the following expression

PRINT, (sig.(3))[0]

and

PRINT sig(3,0)

but neither of these possibilities works.
How to deal with that?

Thanks in advance. Andreas
[Message index]
 
Read Message
Read Message
Previous Topic: Re: accessing data from READ_ASCII
Next Topic: Re: Ternary Operator for Arrays

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

Current Time: Wed Oct 08 22:28:52 PDT 2025

Total time taken to generate the page: 7.20007 seconds