请教:复数矩阵表达问题?
w=0.0do i= 1,100
datad/0 ,100, 200, 300, -100, -200, -300 /
a=0.736
af=0.147
sit=3300*(1+(w/(1.5*pi)**2))**(-0.5)
do kk=1,7
g1(kk)=cos(w*d(kk)/2.5)
g2(kk)=sin(w*d(kk)/2.5)
g3(kk)=(a*exp(-2*d(kk)*(1-a+af*a)/(af*sit))+(1-a)*exp(-2*d(kk)*(1-a+af*a)/sit))
r(kk)=(g3(kk)*g1(kk),g3(kk)*g2(kk))
end do
w=w+0.01
end do
其中,r(7)是复数矩阵,实部g3(kk)*g1(kk),虚部g3(kk)*g2(kk),运行时显示error:
D:\Program Files\Microsoft Visual Studio\MyProjects\shinuzuka\snzka1107.f90(43) Error: A constant or named constant is required in this context.
r(kk)=(g3(kk)*g1(kk),g3(kk)*g2(kk))
-------------------------------------^
D:\Program Files\Microsoft Visual Studio\MyProjects\shinuzuka\snzka1107.f90(43) : Error: An INTEGER or REAL data type is required in this context.
r(kk)=(g3(kk)*g1(kk),g3(kk)*g2(kk))
请问这是什么原因?‘complex r(7)’ 这样定义复数数组对吗? 谢谢! help里搜索cmplx命令
页:
[1]