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

Home » Public Forums » archive » Re: Reading ASCII data from multiple files into one array?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Reading ASCII data from multiple files into one array? [message #49554] Thu, 03 August 2006 09:58
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
nslods wrote:
> I'm still fairly new to this group, but I have a question that's been
> troubling me for some time now. I have several data files that are all
> in ASCII format. I have no problems reading an individual ASCII file,
> but, if it's at all possible, I'd like to read data from all files into
> a 3d array.
>
> For example:
>
> File 1 contains a=[0,3,8,9,10]
> b=[2,4,6,10,20]
> File 2 contains a=[13,8,6,7,2]
> b=[1,2,3,4,5]
>
> I've been trying FOR loops and such to read the data into a 3d array,
> say, for this example, with dimensions [5,2,2] where the 3rd value
> would be the amount of files I'm opening. Am I going about this in a
> somewhat correct manner, or is my logic completely off?
>
> Thanks in advance for any help.
>
> Nicole
>

You don't tell exactly how you are trying to do it, but this article:

http://www.dfanning.com/tips/read_subscripted_array.html

tells you how to circumvent a common trap which might be your problem.

Good luck,
Benjamin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: convert to pixel to RA and DEC in degrees?
Next Topic: Length of command line input

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

Current Time: Wed Oct 08 10:58:08 PDT 2025

Total time taken to generate the page: 0.00383 seconds