Reading ASCII data from multiple files into one array? [message #49558] |
Thu, 03 August 2006 08:49 |
n_slodysko
Messages: 2 Registered: June 2005
|
Junior Member |
|
|
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
|
|
|