24小时热门版块排行榜    

查看: 938  |  回复: 11
当前主题已经存档。
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

hedge

银虫 (小有名气)

[交流] 【求助】FORTRAN 中有没有计算稀疏矩阵本征值的函数?

如题,IMSL库中只有用稀疏矩阵解线性方程的函数!有没有解本征值的啊?

[ Last edited by hedge on 2009-3-9 at 16:28 ]
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

hedge

银虫 (小有名气)

★ ★ ★
zt970831(金币+3,VIP+0):感谢您的交流 7-13 23:30
CALL EVLRG (N, A, LDA, EVAL)
Compute all of the eigenvalues of a real matrix.
但这不是解稀疏矩阵的本征值!!
不合我题目的要求!!
但还是感谢您的回答!
引用回帖:
Originally posted by happymmin at 2009-3-7 19:00:
有的。我用过。找了一个当时联系的程序

program LearnToUse   !学习使用内部函数求随机矩阵的本征值
use imsl
implicit none
integer,parameter::n=4,lda=n
real::a(n,n)
complex::eval(n)
real::ds
in ...

[ Last edited by hedge on 2009-3-9 at 15:35 ]
7楼2009-03-09 15:31:37
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 12 个回答

happymmin

银虫 (正式写手)

★ ★ ★ ★
lvzhu2007(金币+4,VIP+0):谢谢交流 3-8 20:32
有的。我用过。找了一个当时联系的程序

program LearnToUse   !学习使用内部函数求随机矩阵的本征值
use imsl
implicit none
integer,parameter::n=4,lda=n
real::a(n,n)
complex::eval(n)
real::ds
integer::iseed,i,j


open(7,file="eigenvalue.dat"

data a/-2.0,-3.0,-2.0,-1.0,&
        2.0,3.0,0.0,0.0,&
            2.0,2.0,4.0,0.0,&
            2.0,2.0,2.0,5.0/

do i=1,n
write(*,*)(a(i,j),j=1,n)
end do
write(*,*)"          "


call evlrg(n,a,lda,eval)

call wrcrn('eigenvalues',1,n,eval,1,0)

write(*,*)"          "

do i=1,n
write(*,10)eval(i)
write(7,20)i,eval(i)
end do
10 format(4x,"real",4x,f4.2,4x,"imig",4x,f4.2)
write(*,*)"          "
20 format(i4,8x,f4.2,8x,f4.2)


close(7)
stop
end program
The wisdom of God gives us balance, insight and stability.
2楼2009-03-07 19:00:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

happymmin

银虫 (正式写手)

好久没写程序了,我自己都忘得差不多了。
The wisdom of God gives us balance, insight and stability.
3楼2009-03-07 19:01:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

argo

铁杆木虫 (著名写手)

上善若水

call wrcrn('eigenvalues',1,n,eval,1,0)
wrcrn是自已编的吗?编译时出现以下提示:

Error: If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is an element of an array that is not an assumed-shape or pointer array, or a subs
tring of such an element.   [TITLE]
call wrcrn('eigenvalues',1,n,eval,1,0)
居善地,心善渊,与善仁,言善信,正善治,事善能,动善时。
4楼2009-03-07 19:36:49
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见