I use Fortran 95, and now I'm facing a problem as follows:
- I have 8 datafiles with 4 columns each one, they are generated by other program (each file contains the solutions of differential equations for different sets of initial conditions).
- The 4th column is my
x
variable and the 2nd column is myf(x)
. - So, all I want is to create a new file with 9 columns (with the
x
in the first and thef(x)
of each file in the others columns). - However, each file has different values for
x
(and its respectivef
), like 1.10, 1.30 and 1.40 in one and 1.15, 1.25 and 1.42 in other. - So, it's OK for me to take a "band" in
x
, like [1.00;1.20] and write in my new file this average value asx
, and then run thef(x)
in this band under it.
But I couldn't managed how to do it.