I have file structured as (Axis 1) (Axis 2) Data.
As an example:
1.2E-003 -0.500 0.0000000000000000
1.2E-003 -0.493 1.53468784818295775E-004
1.2E-003 -0.487 5.89210645476378352E-004
1.2E-003 -0.481 1.23713800962565101E-003
1.2E-003 -0.475 1.99285240196946144E-003
2.8E-003 -0.500 0.0000000000000000
2.8E-003 -0.493 1.65202052327590321E-004
2.8E-003 -0.487 6.34230407238311057E-004
2.8E-003 -0.481 1.33156043724947304E-003
2.8E-003 -0.475 2.14469618088317755E-003
In other words:
- Each line has 3 real values
- The data is divided in blocks separated by a blank line.
- The size of each block is between 200 and 3000 (this size is unknown prior to reading the file, but I could write a shell script to extract and store this information somewhere if that makes things easier).
- The first value is the same for the entire block.
- There are exactly 1000 blocks.
I would like Mathematica to open this file and store this information inside a variable. This variable would be a list of vectors.
In this list, each element (a vector) corresponds to 1 block, and this vector contains the data from the third column (all other data is discarded).
In this example, the variable should be a list of 2 vectors:
{{ 0.0000000000000000 , 1.53468784818295775E-004 , 5.89210645476378352E-004 , 1.23713800962565101E-003 , 1.99285240196946144E-003 },
{ 0.0000000000000000 , 1.65202052327590321E-004 , 6.34230407238311057E-004 , 1.33156043724947304E-003 , 2.14469618088317755E-003 }}
Is this easy to do?


Import. – b.gatessucks Mar 4 at 13:07