tomg10000
- 3
- 0
Hi everybody,
I have 3 columns of data (3 different variables) and 400 rows. How would I set up a matrix/array sort of thing to read each row individually and store it in my fortran program to calculate equations at each step?
What I have basically tried and can't get to work, I think it tries to read past the file all the time...
-------------------------------------
read(99,*)N
allocate(x(N),y(N),z(N))
do i=1,N ! Read matrix row-by-row
read(99,*)x(i),y(i),z(i)
'Equations calculating from each line'
enddo
close(99)
---------------------------------------
Any help? or does someone have part of a working program i can use and modify?
Thanks.
I have 3 columns of data (3 different variables) and 400 rows. How would I set up a matrix/array sort of thing to read each row individually and store it in my fortran program to calculate equations at each step?
What I have basically tried and can't get to work, I think it tries to read past the file all the time...
-------------------------------------
read(99,*)N
allocate(x(N),y(N),z(N))
do i=1,N ! Read matrix row-by-row
read(99,*)x(i),y(i),z(i)
'Equations calculating from each line'
enddo
close(99)
---------------------------------------
Any help? or does someone have part of a working program i can use and modify?
Thanks.