python计算对角线有理函数插值,python对角线插值,''' p = rati
文章由Byrx.net分享于2019-03-23 09:03:28
python计算对角线有理函数插值,python对角线插值,''' p = rati
''' p = rational(xData,yData,x) Evaluates the diagonal rational function interpolant p(x) that passes through he data points''' from numpy import zerosdef rational(xData,yData,x): m = len(xData) r = yData.copy() rOld = zeros(m) for k in range(m-1): for i in range(m-k-1): if abs(x - xData[i+k+1]) < 1.0e-9: return yData[i+k+1] else: c1 = r[i+1] - r[i] c2 = r[i+1] - rOld[i+1] c3 = (x - xData[i])/(x - xData[i+k+1]) r[i] = r[i+1] + c1/(c3*(1.0 - c1/c2) - 1.0) rOld[i+1] = r[i+1] return r[0]
相关内容
- 练习python,,[Python]代码de
- 正态分布概率计算,态分布概率计算,[Python]代码de
- python中如果通过索引遍历列表,python索引遍列表,pytho
- 参数化建筑-基础-附表皮,建筑表皮,建筑立面# -*- co
- 递归查找文件,递归查找,[Python]代码#!
- FFT估计,,用Python进行FFT
- Python FTP暴力破解工具,pythonftp暴力破解,[Python]代码#!
- SSH代理连接器,ssh连接器,[Python]代码#
- 从百度MP3中批量下载某歌手的歌,百度mp3歌手,download
- python之POP详解,pythonpop,[Python]代码#!
评论关闭