M
Marc Reclaire
Hiho,
I have an ASCII-File with data from a simulation programm. It lookslike
this:
2.500000E+0026.911733E+0022.950929E+0054.746349E+0040.000000E+0000.000000E+0
00
2.590362E+0023.806547E+0023.377923E+0057.040307E+0040.000000E+0000.000000E+0
00
-1.000000E+000-1.000000E+000-1.000000E+000-1.000000E+0000.000000E+0000.00000
0E+000
2.530572E+0022.145215E+0021.750804E+0053.285819E+0030.000000E+0000.000000E+0
00
2.537223E+0026.500754E+0024.166493E+0056.221317E+0040.000000E+0000.000000E+0
00
-1.000000E+000-1.000000E+000-1.000000E+000-1.000000E+0000.000000E+0000.00000
0E+000
2.547310E+0025.723339E+0023.675294E+0055.031395E+0040.000000E+0000.000000E+0
00
2.549374E+0025.902411E+0023.681309E+0056.965566E+0040.000000E+0000.000000E+0
00
2.533486E+0026.700119E+0023.686952E+0055.628433E+0040.000000E+0000.000000E+0
00
2.537227E+0026.500726E+0024.168410E+0056.231714E+0040.000000E+0000.000000E+0
00
2.600828E+0023.426328E+0023.277678E+0055.456118E+0040.000000E+0000.000000E+0
00
2.601910E+0023.427085E+0022.484092E+0053.851131E+0040.000000E+0000.000000E+0
00
-1.000000E+000-1.000000E+000-1.000000E+000-1.000000E+0000.000000E+0000.00000
0E+000
2.548592E+0025.911483E+0023.347479E+0054.669881E+0040.000000E+0000.000000E+0
00
2.548747E+0025.907943E+0023.208793E+0054.656371E+0040.000000E+0000.000000E+0
00
You can see that there are 6 columns. Im interested in the second column.
But I dont know how to access this column. I tried several options with
fscanf. But nothing worked. Anybody knows how to do it?
I tried something like that:
fscanf(temp, "%f %f %f %f %f %f", var, var 2 .... ); Tried the Options
E and so on ..
Thx for help.
Greetings Marc
I have an ASCII-File with data from a simulation programm. It lookslike
this:
2.500000E+0026.911733E+0022.950929E+0054.746349E+0040.000000E+0000.000000E+0
00
2.590362E+0023.806547E+0023.377923E+0057.040307E+0040.000000E+0000.000000E+0
00
-1.000000E+000-1.000000E+000-1.000000E+000-1.000000E+0000.000000E+0000.00000
0E+000
2.530572E+0022.145215E+0021.750804E+0053.285819E+0030.000000E+0000.000000E+0
00
2.537223E+0026.500754E+0024.166493E+0056.221317E+0040.000000E+0000.000000E+0
00
-1.000000E+000-1.000000E+000-1.000000E+000-1.000000E+0000.000000E+0000.00000
0E+000
2.547310E+0025.723339E+0023.675294E+0055.031395E+0040.000000E+0000.000000E+0
00
2.549374E+0025.902411E+0023.681309E+0056.965566E+0040.000000E+0000.000000E+0
00
2.533486E+0026.700119E+0023.686952E+0055.628433E+0040.000000E+0000.000000E+0
00
2.537227E+0026.500726E+0024.168410E+0056.231714E+0040.000000E+0000.000000E+0
00
2.600828E+0023.426328E+0023.277678E+0055.456118E+0040.000000E+0000.000000E+0
00
2.601910E+0023.427085E+0022.484092E+0053.851131E+0040.000000E+0000.000000E+0
00
-1.000000E+000-1.000000E+000-1.000000E+000-1.000000E+0000.000000E+0000.00000
0E+000
2.548592E+0025.911483E+0023.347479E+0054.669881E+0040.000000E+0000.000000E+0
00
2.548747E+0025.907943E+0023.208793E+0054.656371E+0040.000000E+0000.000000E+0
00
You can see that there are 6 columns. Im interested in the second column.
But I dont know how to access this column. I tried several options with
fscanf. But nothing worked. Anybody knows how to do it?
I tried something like that:
fscanf(temp, "%f %f %f %f %f %f", var, var 2 .... ); Tried the Options
E and so on ..
Thx for help.
Greetings Marc