I'm almost finishing this program, there is only one problem and i think it's because the complex numbers.
When i run the program and plot the graph (with Origin), appears:
But the correct is:
The part with the complex numbers (where V>E(K)) is the problem i think, because when...
I trade K2 to AK2, because this line says that K is actually INTEGER:
IMPLICIT REAL (8) (A-B,D-H,O-Z)
And I add CMPLX and it works.
But why i need this?
In other line, I write: CZ = (0.D0,1.D0) for define complex number and it works fine..
i trade to ENDIF and the erros keep on..
i use IF and ELSE now, when E.eq.V(M), K2 = 0 so i can use in the complex part (CK2 = 0.D0,K2 = 0.D0,0.D0)
I indicate the line with error in the code
DO M=3,NZ
IF (E.GT.V(M)) THEN
K2 = DSQRT(E-V(M))
CK2 = (K2,0.D0) !LINE 48...
Yes, i did this and found the problem, i think.
It was some problems with complex numbers and definitions
I tried to fix with this IF, but wasn't work..
CKB = DSQRT(E-V(2))
!WRITE(*,*) CKB, V(2)*RY, E
DO M=3,NZ
IF (E.GT.V(M)) THEN
K2 = DSQRT(E-V(M))
CK2 =...
There is no errors anymore but when i run the program asking for print CEF appears NaN (not a number), i don't know what to do
PROGRAM ABCDE
IMPLICIT REAL (8) (A-B,D-H,O-Z) !Define numeros reais e imaginarios
IMPLICIT COMPLEX (8)(C)
PARAMETER(NZ=501,L=2)...
I don't know why but i changed just the first lines (DIMENSION) and the program worked.
Then i did some little changes like "DO M = NZ, 2" to "DO M = 2,NZ"
The complete code:
PROGRAM ABCDE
IMPLICIT REAL (8) (A-B,D-H,O-Z) !Define numeros reais e imaginarios
IMPLICIT...
In the subrotine, if i want do a loop with matrix, how i define the matrix?
I try this but didnt work, i believe that the logica is right (i did in a paper before)
The lines with "!" i left just like a base for me
!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
SUBROUTINE...
1) I used: COMPLEX, DIMENSION(L) :: and REAL, DIMENSION(L) :: and i think it works
2) I need remove this line? IMPLICIT REAL (8) (A-B,D-H,O-Z)
3) In this part i try calculate KY, and after to do:
KY(500)*KY(501)=KW
KY(NZ-2)*KW=KX
KW=KX where renew KW
I have a matrix[L,L] with D e P...