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 #39366] Wed, 12 May 2004 13:25 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 12 May 2004 11:44:09 -0600, David Fanning wrote:

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

Just wanted to point out that mydata[5].(4) will typically be quicker
if the mydata vector is quite long, and also requires fewer
parentheses. Your method first creates a (potentially long) vector,
and then subscripts it.

JD
[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: Sat Oct 11 13:49:36 PDT 2025

Total time taken to generate the page: 1.52713 seconds