二维插值:griddata和interp2

MATLAB documentation_interp2

MATLAB_documentation_griddata

Vq = interp2(X,Y,V,Xq,Yq)

X and Y contain the coordinates of the sample points. V contains the corresponding function values at each sample point. Xq and Yq contain the coordinates of the query points.

specifies an alternative interpolation method: 'linear', 'nearest', 'cubic', 'makima', or 'spline'. The default method is 'linear'

Vq = interp2(___,method,extrapval) also specifies extrapval, a scalar value that is assigned to all queries that lie outside the domain of the sample points.

If you omit the extrapval argument for queries outside the domain of the sample points, then based on the method argument interp2 returns one of the following:

  • Extrapolated values for the 'spline' and 'makima' methods

  • NaN values for other interpolation methods 当超出采样点的范围时,会返回NAN

Sample grid points, specified as real matrices or vectors. The sample grid points must be unique.网格采样点必须唯一

If X and Y are vectors, then they are treated as grid vectors. The values in both vectors must be strictly monotonic, either increasing or decreasing.当X和Y是向量时,向量的值必须严格单调


vq = griddata(x,y,v,xq,yq,method)

method can be 'linear', 'nearest', 'natural', 'cubic', or 'v4'. The default method is 'linear'.

x, y, and v are vectors containing scattered (nonuniform) sample points and data.

The sample points must be unique.采样点必须唯一

  • Specify arrays if you want to pass a grid of query points. Use ndgrid or meshgrid to construct the arrays.

  • Specify vectors if you want to pass a collection of scattered points.

The specified query points must lie inside the convex hull of the sample data points. griddata returns NaN for query points outside of the convex hull.

指定的查询点必须位于样本数据点的凸包内。 griddata为凸包外部的查询点返回NaN。

MATLAB插值笔记相关推荐

  1. MATLAB一维插值笔记与应用–十安辰

    MATLAB一维插值笔记与应用–十安辰 我们以一个题来了解一维插值,如下: ​ 天文学家在1914年8月份的7次观测中,测得地球与金星之间的距离(单位:m),并取其常用对数值与日期的一组历史数据,如表 ...

  2. 台湾国立大学郭彦甫Matlab教程笔记(9) basic plotting

    台湾国立大学郭彦甫Matlab教程笔记(9) today: 1.basic plotting 2.graphical objects properties basics matlab has a po ...

  3. MATLAB学习笔记(十二)

    MATLAB学习笔记(十二) 一.数据插值 1.1 数据插值的计算机制 1.2 数据插值的matlab函数 二.曲线拟合 2.1 曲线拟合原理 2.2 曲线拟合的实现方法 三.数据插值与曲线拟合比较 ...

  4. B站台湾大学郭彦甫|MATLAB 学习笔记|06 高阶绘图 Advanced Plot

    MATLAB学习笔记(06 高阶绘图 Advanced Plot) 如果想获得更好浏览体验的朋友可以转到下面链接 06 1. 对数图 (Logarithm Plots) x = logspace(-1 ...

  5. MATLAB学习笔记0:学习须知

    阅读前请注意: 1. 该学习笔记是华中师范大学HelloWorld程序设计协会2021年寒假MATLAB培训的学习记录,是基于培训课堂内容的总结归纳.拓展阅读.博客内容由 @K2SO4钾 撰写.编辑, ...

  6. [MATLAB学习笔记]采用快速傅里叶变换求时间序列的周期项

    [MATLAB学习笔记]采用快速傅里叶变换求时间序列的周期项 1. 背景 现有长度为11年的5个时间序列,为某拟研究对象的5个参数.现计划先通过快速傅里叶变换求每个系数序列的显著周期项,再分别按照傅里 ...

  7. matlab arr3(5 end),matlab复习笔记.doc

    matlab复习笔记.doc 如果一个语句在一行内书写太长了,可能要另起一行接着写,在这种情况下我们需要在第一行末打上半个省略号(),再开始第二行的书写.历史命令窗口(THEHISTORYCOMMAN ...

  8. Matlab学习笔记——数据文件定位

    写在这里的初衷,一是备忘,二是希望得到高人指点,三是希望能遇到志同道合的朋友. 目录 数据文件定位 1.fseek函数 2.ftell函数 3.feof函数 数据文件定位 1.fseek函数 用于改变 ...

  9. 台湾国立大学郭彦甫Matlab教程笔记(22) Cramer's method(Inverse matrix逆矩阵法)

    台湾国立大学郭彦甫Matlab教程笔记(22) Cramer's method(Inverse matrix) matrix left division左除:\ or mldivide() solvi ...

最新文章

  1. jquery ajax node,jquery ajax post json and node express
  2. cmd中操作mysql_Windows中cmd操作mysql
  3. go语言 c# 混合编程 pdf,C# 结合 Golang 开发
  4. 设计模式学习笔记——抽象工厂(Abstract Factory)模式
  5. Java回文数.如12321,123454321(5个数)
  6. vue 获取响应头里set-cookie的值_最简化 VUE的响应式原理
  7. ls一1测距仪说明书_小米又推爆品:99元杜克LS-P激光测距仪,已获红点和iF大奖...
  8. android不同应用程序之间启动Activity
  9. [转载] Python杂记之 list.clear()方法,清空列表
  10. python相关软件安装流程图解——Windows下安装Redis以及可视化工具——Redis-x64-3.2.100——redis-desktop-manager-0.9.3.817...
  11. Debian 9 安装配置 Caddy Server
  12. 软件测试思维总结(1)-----比较思维:利用好可参照的资源
  13. Java-UML类图
  14. 独家中文汉化AE脚本 Animation Studio v2.3 Win/Mac一键安装版 预设持续更新 支持CC2020
  15. 计算机按电源键无法反应,电脑无法开机怎么办 按电脑开机键也没反应的原因及处理解决办法...
  16. 如何在应用中打开系统播放器
  17. Win Server 2012发布!回顾Server发展史
  18. 国内电子商务的几种典型
  19. CodeVS 1697-⑨要写信
  20. Linux RPMsg框架--以及应用于iMX6 SoloX连接A9和M4 Core

热门文章

  1. 三菱PLC型号是怎么命名的
  2. 【基因调控网络】Discovering Gene Networks with a Neural-Genetic Hybride(单层神经网络与遗传算法混合算法2005)
  3. 利用SMB协议实现局域网内设备文件的共享
  4. python opencv安装
  5. 使用Drozer对Android四大组件进行测试
  6. IntelliJ IDEA中好用的插件 写代码必备
  7. android多类型启动广告,如何在我的应用启动界面实现「开屏广告」?
  8. 衡石可视化:从 eCharts 到 namjagbarwa
  9. Unity Shader Fog雾气效果
  10. Centos 系统分区扩容操作指南