The following codes produce a data-table containing 10x10 values.
PROGRAM data_table
IMPLICIT NONE
INTEGER::i,x,y,k,j,m,ierr
INTEGER,DIMENSION(1:10)::dtable
ierr=0
x=10
y=10
OPEN(UNIT=100,FILE='dtable.txt',STATUS='REPLACE',ACTION='WRITE',IOSTAT=ierr)
DO i = 1,x
DO j=0,y-1
k=j*x
m=i+k
dtable(j+1)=m
ENDDO
WRITE(100,'(10I7)')dtable
ENDDO
CLOSE (UNIT=100)
END
My questions are,
- How can I convert this data-table into a two dimensional array A?
- How can I generate a second data table containing every 1st, 5th and 9th rows from the first data-table which would look like,
1, 11,21....91 5,15,25.....95 9,19,29.....99
Many thanks for any suggestion.