program main
include 'link_fnl_shared.h'
include 'link_fnl_static.h'
USE MKL95_PRECISION
USE MKL95_LAPACK
implicit none
integer ii,lda,n
double precision a(3,3)
complex(kind=8) e(3),v(3,3),anv(3,3),v1(3,3),v2(3,3) !特征值与特征向量要声明为复双精度
a(1,1)=1.d0
a(1,2)=2.d0
a(1,3)=0.d0
a(2,1)=0.d0
a(2,2)=3.d0
a(2,3)=0.d0
a(3,1)=2.d0
a(3,2)=-4.d0
a(3,3)=2.d0
call devcrg(3,a,3,e,v,3) !求特征值e与特征向量(矩阵)v
call DLINCG(3,v,3,ANv,3)
v1=matmul(ANV,a)
v2=matmul(v1,v) ! 对角化结果
write(*,*)v2
end
fortran.PNG (28.68 KB, 下载次数: 226)
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |