"saman" <kaviani.saman@gmail.com> wrote in message
news:224cc9c3-023c-4467-bbc7-e0f20b669609@googlegroups.com...
> hi ,
> I have three matrix called
> Real, Dimension(
::A,B,C
> A=5,B=5,C=5
> I want to print them to an external file where first column is A, 2nd
> column is B and the last is C. For example I want to have the following
> format in output:
>
> 15 20 1
> 12 21 4
> 18 12 2
> 15 12 3
> 60 78 4
>
> I write this code but it is not what I want:
>
> OPEN(35, file = 'phenotype',status="REPLACE")
delete the next two lines
> DO cc=1,n
> DO bb=1,n
> DO aa=1,n
In the next line replace bb with aa and replace cc with aa
> WRITE(35, '(F10.3,2x,F10.3,2x,F10.3)')
> phenotype(aa),genvalue(bb),E(cc)
delete the next two lines
> END DO
> END DO
> END DO
> CLOSE(35)
>
> Can anybody help me?
> best,
> Sami
For Fortran books try :
Fortran 95/2003 for Scientists & Engineers by Stephen J Chapman
Fortran 95/2003 Explained by Michael Metcalf, John Reid and Malcolm Cohen
Modern Fortran Explained (Numerical Mathematics and Scientific Computation)
by Michael Metcalf, John Reid and Malcolm Cohen
there are others (Google Fortran books or see the Wikipedia Fortran page for
references to Textbooks)
Les