Use python to calculate the N smallest eigenvalues of a tridiagonal matrix,,## module ei
文章由Byrx.net分享于2019-03-23 10:03:34
Use python to calculate the N smallest eigenvalues of a tridiagonal matrix,,## module ei
## module eigenvals3''' lam = eigenvals3(d,c,N). Returns the N smallest eigenvalues of a tridiagonal matrix [A] = [c\d\c].''' from lamRange import *from ridder import *from sturmSeq import sturmSeqfrom numpy import zerosdef eigenvals3(d,c,N): def f(x): # f(x) = |[A] - x[I]| p = sturmSeq(d,c,x) return p[len(p)-1] lam = zeros(N) r = lamRange(d,c,N) # Bracket eigenvalues for i in range(N): # Solve by Brent's method lam[i] = ridder(f,r[i],r[i+1]) return lam
相关内容
- python利用wmi模块统计windows下硬盘信息,pythonwmi,# -*- c
- python中if elif条件语句实用范例,pythonelif,marks = 99if
- python中字典dict的常用操作方法,python字典dict,#创建一空
- python通过socket实现网络广播代码,pythonsocket,import sock
- python使用 htmllib 分析网页内容,pythonhtmllib,import htmll
- python中localtime和gtime的区别及时区计算,localtimegtime,l
- python自动修改本机网关的代码,python网关,#!/usr/bin/p
- Python判断给定的数是否是回文数,,def isPalind
- python检测远程udp端口是否打开,python检测udp端口,impor
- Powell’s method of minimizing user-supplied function in Python,,'
评论关闭