Hi
Fortran is not my speciality to be honest. However, I must adapt a program I have and run it in Fortran.
I have a function of this type:
So was hoping someone could help on this: I would like to make a program (lets call it test.f) which would accept a filename and a number as arguments.
Then, it would open the file, and read line by line the X and Y values, separated let's say by a ; These values would be placed in an array of the type PV (DOUBLE PRECISION) until it reached n read lines. At this time, calcp would be called with NPTS=n, and its result outputed to a file. The program would then read another n lines, and do the same. And so on until the end of the file.
Can someone help me out?
Thanks in advance.
JKepler
Fortran is not my speciality to be honest. However, I must adapt a program I have and run it in Fortran.
I have a function of this type:
Code:
SUBROUTINE calcp(PV,NPTS,S,NC,CH)
C PV = D.P. ARRAY OF INPUT X and Y VALUES, STORED
C AS A 2 X NPTS ARRAY.
So was hoping someone could help on this: I would like to make a program (lets call it test.f) which would accept a filename and a number as arguments.
Then, it would open the file, and read line by line the X and Y values, separated let's say by a ; These values would be placed in an array of the type PV (DOUBLE PRECISION) until it reached n read lines. At this time, calcp would be called with NPTS=n, and its result outputed to a file. The program would then read another n lines, and do the same. And so on until the end of the file.
Can someone help me out?
Thanks in advance.
JKepler