- 9
- 0
- 约 115页
- 2021-06-27 发布于江苏
- 举报
Python科学计算与数据处理-SciPy数值计算库.ppt
插值—interpolate * 演示二维插值。 “” import numpy as np from scipy import interpolate import pylab as pl def func(x, y): return (x+y)*np.exp(-5.0*(x**2 + y**2)) # X-Y轴分为15*15的网格 y, x = np.mgrid[-1:1:15j, -1:1:15j] fvals = func(x,y) # 计算每个网格点上的函数值 # 二维插值 newfunc = interpolate.interp2d(x, y, fvals, kind=‘cubic‘) 插值—interpolate * # 计算100*100的网格上的插值 xnew = np.linspace(-1,1,100) ynew = np.linspace(-1,1,100) fnew = newfunc(xnew, ynew) # 绘图 # 为了更明显地比较插值前后的区别,使用关键字参数interpolation=nearest # 关闭imshow()内置的插值运算。 pl.subplot(121) pl.imshow(fvals, extent=[-1,1,-1,1], cmap=pl.cm.jet, in
您可能关注的文档
- HMI-人机交互触控未来 信息整合可视化管里.pptx
- How to Write a Paper Intro Class 研究生资料 英文.pptx
- how to write a paper lecture 2 研究生资料 英文.pptx
- How+to+Write+a+Paper+-+Lecture+14 研究生资料 英文.pptx
- How+to+Write+a+Paper+Lecture+4 研究生资料 英文.pptx
- How+to+write+a+paper+Lecture+5 研究生资料 英文.pptx
- How+to+write+a+paper+Lecture+6 研究生资料 英文.pptx
- How+to+Write+a+Paper+Lecture+7 研究生资料 英文.pptx
- How+to+Write+a+Paper+Lecture+8 研究生资料 英文.pptx
- How+to+Write+a+Paper+Lecture+11 研究生资料 英文.pptx
- 人教版高中英语必修第二册UNIT 3 Part 2 Listening and Talking—Video Time课件.ppt
- 人教版高中英语必修第二册UNIT 3 Part 1 Listening and Speaking—Discovering Useful Structures课件.ppt
- 人教版高中英语必修第二册UNIT 4 Part 1 Listening and Speaking—Discovering Useful Structures课件.ppt
- 人教版高中英语必修第二册UNIT 4 Part 2 Listening and Talking—Video Time课件.ppt
- 人教版高中英语必修第二册UNIT 5 Part 2 Listening and Talking—Video Time课件.ppt
- 人教版高中英语必修第二册晨读晚诵课件.ppt
- 数字电子电路卡诺图法化简.pptx
- 2026栈和队列 学习课件.pptx
- 人教版高中英语必修第二册UNIT 4 课时作业(三)含答案.docx
- 人教版高中英语必修第二册UNIT 3 课时作业(一)含答案.docx
最近下载
- 新22S1 卫生设备工程新疆图集资料.pptx VIP
- 通力电梯KCE故障代码详细R10.4.docx
- 22G101与16G101钢筋平法图集对比变化汇总.docx VIP
- 上海人工智能训练师三级理论题库和答案2025.docx
- 2025年小型家用电器制造工赛项理论考试题库(含答案).doc VIP
- 《安全色和安全标志GB2894-2025》新旧版对比学习课件.pptx
- (正式版)DB11∕T 736-2023 《锦鲤养殖技术规范》.docx VIP
- (高清版)DB11∕T 736-2023 锦鲤养殖技术规范.pdf VIP
- 16G362 钢筋混凝土结构预埋件.pptx VIP
- 拼音练习字帖(可编辑打印).docx VIP
原创力文档

文档评论(0)