[Thread Prev][Thread Next][Index]

reading multiple datasets from a single ascii file



Hello,
I've scanned the archives but am unable to find a solution to reading 
multiple datasets from a single file.

I have an ascii file with separate datasets separated by a header line.
There are 3 variables/row and the header indicates the number of rows.
In the following example, there are 2 datasets, the first has 3 columns by 
3 rows; the second has 3 columns by 4 rows.
Is it possible to read the number of rows from the header and then read 
only that many rows, then read the next header and read the rows for that 
dataset, etc?

3 (This header indicates 3 rows)
1 2 3
4 5 6
7 8 9
4 (This header indicates 4 rows)
1 2 3
4 5 6
7 8 9
10 11 12 

Thanks for any help. 

Steve




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement