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

Home » Public Forums » archive » Re: saving arrays within loop
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: saving arrays within loop [message #53592] Sun, 22 April 2007 08:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
metachronist writes:

> I have binary datafiles (daily records for every minute from a given
> station) which I could read using anonymous structures without any
> problem. What I am trying to do is to read data from different
> stations and group them into one big array, having indices =
> (number_of_stations, data_having_dimensions_of_dim).
>
> For example, I have tried this.. Outside the loop, I define the struct
> and replicate the struct and within the loop, read the complete
> datafile ('data', having dimensions of1440,31) from different
> stations.

I am confused. If you can read these data files into
anonymous structures, and you make an ARRAY of
these anonymous structures, why can't you just
loops through the data files, reading each file,
and then storing the data in the appropriate location
in your array of structures? In the end, you will
have (or can easily create) what you want.

> But only, the last station values get stored?! Do I need to index the
> individual station temp values? I didn't think so.

Well, if only the last station values get stored, then
I would think the ONLY solution would be to index the
station values. But I can't really tell from your description
what you think that means.

> What is it that I am doing which is so obviously wrong?

I think you are trying to make it too hard. If you already
have something that works, just do that thing for all your
data files. In the end, you can treat your array of structures
in the way you apparently want to treat your data.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: Re: compile_opt for double?
Next Topic: Xinteranimate and plots

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

Current Time: Wed Oct 08 19:51:05 PDT 2025

Total time taken to generate the page: 0.00414 seconds