Skip to main content
1 of 3
wei
  • 33
  • 6

Import data format

I have a c++ program output the f(x) for each time step. Like

time step 0:

0.2 42.8
0.4 12.3
0.6 32.1
0.8 37.3

time step 1:

0.2 44.2
0.4 17.8
0.6 39.0
0.8 30.1

... I want to import this into the mathematica with format

data = {
  {{0.2`, 42.8`}, {0.4`, 12.3`}, {0.6`, 32.1`}, {0.8`, 37.3`}},
  {{0.2`, 44.2`}, {0.4`, 17.8`}, {0.6`, 39.`},  {0.8`, 30.1`}}
  };

So data for each time step will be in one list. Thanks.

wei
  • 33
  • 6