主题:复矩阵求特征值,求jstzhurj大姐帮忙看下怎么回事
[em2][em2][em2][em2][em2][em2][em2][em2]
我编个程序求复矩阵特征值,用evlhf函数求的,但是提示出好几个错误,大姐帮忙看下啊。
program mceshidian
use imsl
implicit real*8(a-h,o-z)
parameter(N=26)
complex*16 i,H0(N,N),Hlr(N,N),Hrl(N,N),H(N,N)
real ka,eval
ka=0.25
I=DCMPLX(0.0,1.0)
H0=0.0D0
HLR=0.0D0
H=0.0
do 32 J=1,N/2-1
H0(J,J+1)=-T
H0(J+1,J)=-T
H0(J+N/2,J+1+N/2)=-T
H0(J+1+N/2,J+N/2)=-T
32 continue
DO 33 J=1,N/2,2
H0(J,J+N/2)=-T
33 H0(J+N/2,J)=-T
DO 34 J=2+N/2,N,2 !对右边原胞作用哈密顿矩阵
34 HLR(J,J-N/2)=-T
DO 35 IA=1,N
DO 35 IB=1,N
35 HRL(IA,IB)=DCONJG( HLR(IB,IA) )
H=H0+exp(I*ka)*HLR+exp(-I*ka)*HRL
open(2,file='EK.txt')
call evlhf(N,H,N,eval)
write(2,*) eval
end
出错信息如下:
Error: The type of the actual argument differs from the type of the dummy argument. [H]
call evlhf(N,H,N,eval)
H是复厄米矩阵啊?怎么老提示出错呢。奇怪啊
我编个程序求复矩阵特征值,用evlhf函数求的,但是提示出好几个错误,大姐帮忙看下啊。
program mceshidian
use imsl
implicit real*8(a-h,o-z)
parameter(N=26)
complex*16 i,H0(N,N),Hlr(N,N),Hrl(N,N),H(N,N)
real ka,eval
ka=0.25
I=DCMPLX(0.0,1.0)
H0=0.0D0
HLR=0.0D0
H=0.0
do 32 J=1,N/2-1
H0(J,J+1)=-T
H0(J+1,J)=-T
H0(J+N/2,J+1+N/2)=-T
H0(J+1+N/2,J+N/2)=-T
32 continue
DO 33 J=1,N/2,2
H0(J,J+N/2)=-T
33 H0(J+N/2,J)=-T
DO 34 J=2+N/2,N,2 !对右边原胞作用哈密顿矩阵
34 HLR(J,J-N/2)=-T
DO 35 IA=1,N
DO 35 IB=1,N
35 HRL(IA,IB)=DCONJG( HLR(IB,IA) )
H=H0+exp(I*ka)*HLR+exp(-I*ka)*HRL
open(2,file='EK.txt')
call evlhf(N,H,N,eval)
write(2,*) eval
end
出错信息如下:
Error: The type of the actual argument differs from the type of the dummy argument. [H]
call evlhf(N,H,N,eval)
H是复厄米矩阵啊?怎么老提示出错呢。奇怪啊