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

Home » Public Forums » archive » Re: READ_ASCII - accessing data from structures
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: READ_ASCII - accessing data from structures [message #39370 is a reply to message #39366] Wed, 12 May 2004 10:44 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Martin Doyle writes:

> I wonder if anyone might be able to help me with this?
>
> I'm using the IDL READ_ASCII function to read in a semicolon seperated
> file, after which I'd like to access individual elements of that data
> file. From the RSI website, I see that I can access the data fields
> (i.e. each column of data) by using, for example;
>
> print, mydata.(4)
>
> using the Variable_Name.(Tag_Index) method.
>
> Could someone tell me how to get to the individual elements of
> mydata.(4)?? Using the above I can only get a large stream of numbers,
> I need to use them one by one.

Well, this should work:

Print, (mydata.(4))[5]

But usually, you would just pull the column off and treat
it as an array, unless you had some speciific memory
considerations:

col4 = Reform(mydata.(4))
print, col4[5]

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Re: return from the dead - apologies
Next Topic: Quaternions to Euler Angles

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

Current Time: Sun Oct 12 00:54:52 PDT 2025

Total time taken to generate the page: 0.73635 seconds