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

Home » Public Forums » archive » Re: 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
Re: accessing data from READ_ASCII [message #39513] Wed, 26 May 2004 06:53 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Andreas Ernst writes:

> 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?

When I read your example data with the code you supply
above the variable "sig" is a structure containing one
field, FIELD01, which is a 14 by 3 float array. The
third column would then be:

col3 = reform((sig.(0))[2,*])

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Depth visibility with Object Graphics !!!
Next Topic: accessing data from READ_ASCII

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

Current Time: Wed Oct 08 17:04:28 PDT 2025

Total time taken to generate the page: 0.00395 seconds