Recent content by yuvan
-
Y
Fortran How to use Real Array Index in Matrix dimension?
I did like this and getting all values as zeros. Did I do it wrong way? IM=1 IL=1 AN(I,IM)=0.0 BN(I,IM)=0.0 DT=0.1 DT1=0.01 DK1=1.0 DK2=1.0 DO WHILE(DK1<=10) DO WHILE(DK2<=100) .. .. N(I,IM)=AN1(I,IL) BN(I,IM)=BN1(I,IL) DK2=DK2+DT1 IM=IM+1 IL=IL+1 ENDDO AN(I,INT(DK1))=AN(I,IM)...- yuvan
- Post #19
- Forum: Programming and Computer Science
-
Y
Fortran How to use Real Array Index in Matrix dimension?
Thank you. I did this.- yuvan
- Post #17
- Forum: Programming and Computer Science
-
Y
Fortran How to use Real Array Index in Matrix dimension?
PROGRAM MODEL IMPLICIT NONE REAL::DT,DT1,DK1,DK2 INTEGER::I,J,IL,IM REAL::XN2(1),XO2(1) REAL,DIMENSION(21,50000)::AN,BN,AN1,BN1 REAL,DIMENSION(21)::XA,XB REAL,DIMENSION(21,21)::WA,WB,WAB,WBA REAL,DIMENSION(21)::SUMA,SUMAB,SUMB,SUMBA XN2=1E-7 XO2=1E-8 OPEN(1,FILE='TEST1.dat')...- yuvan
- Post #15
- Forum: Programming and Computer Science
-
Y
Fortran How to use Real Array Index in Matrix dimension?
This the code. PROGRAM MODEL IMPLICIT NONE REAL::DT,DT1,DK1,DK2 INTEGER::I,J,IL,IM REAL::XN2(1),XO2(1) REAL,DIMENSION(21,50000)::AN,BN,AN1,BN1 REAL,DIMENSION(21)::XA,XB REAL,DIMENSION(21,21)::WA,WB,WAB,WBA REAL,DIMENSION(21)::SUMA,SUMAB,SUMB,SUMBA XN2=1E-7 XO2=1E-8 OPEN(1,FILE='TEST1.dat')...- yuvan
- Post #10
- Forum: Programming and Computer Science
-
Y
Fortran How to use Real Array Index in Matrix dimension?
I am unable to upload files. It is showing "The uploaded file does not have an allowed extension. " although I am just trying to upload .f90 and .dat files.- yuvan
- Post #9
- Forum: Programming and Computer Science
-
Y
Fortran How to use Real Array Index in Matrix dimension?
I am still getting NaN values.- yuvan
- Post #7
- Forum: Programming and Computer Science
-
Y
Fortran How to use Real Array Index in Matrix dimension?
As I am initializing IM=1, for first iteration IM+1=2, i.e. it "ll calculate AN(I,2) and BN(I,2) and these value "ll be used in the next iteration for subroutine and subsequently calculate AN(I,3) and BN(I,3). These values (AN(I,3) and BN(I,3)) "ll be used again for next iteration and son on...- yuvan
- Post #6
- Forum: Programming and Computer Science
-
Y
Fortran How to use Real Array Index in Matrix dimension?
The subroutines provide the value of XA and XB which are function of both AN and BN. IM is changing inside the inner loop. I don't know, can I keep AN(I,IM)=AN(I,IM+1) but I fear it might not interchange value (However, I tried AN(I,IM)=AN(I,IM+1) but no change in result). As far as I know if I...- yuvan
- Post #3
- Forum: Programming and Computer Science
-
Y
Fortran How to use Real Array Index in Matrix dimension?
I am developing a FORTRAN code (.f90) which "ll calculate some matrix in some time interval (dt1=0.001) and these matrices have to be integrated in some time steps (dt=0.1). Though I am experience in FORTRAN 77, new to FORTRAN 90. I am unable to make dimension of matrix real (I think that is the...- yuvan
- Thread
- Array Dimension Fortran90 Gfortran Index Matrix Ubuntu
- Replies: 21
- Forum: Programming and Computer Science