matlab中interp2函数的数学公式是什么? 5

 我来答
time诺忆
推荐于2017-09-20 · TA获得超过331个赞
知道小有建树答主
回答量:107
采纳率:0%
帮助的人:41.8万
展开全部
ZI=interp2(X,Y,Z,XI,YI,method),
其中X和Y为由自变量组成的数组,X与Y尺寸相同,Z为2维函数数组。
XI和YI为插值点的自变量数组,method为插值方法选项,提供了4种方法;‘nearest’、‘linear’、‘spline’、‘cubic’等。
二维插值主要应用于图形图像处理和三维曲线拟合等领域。

简单来说就是 二维数据插值
下面是matlab给出的解释
INTERP2 2-D interpolation (table lookup).
ZI = INTERP2(X,Y,Z,XI,YI) interpolates to find ZI, the values of the
underlying 2-D function Z at the points in matrices XI and YI.
Matrices X and Y specify the points at which the data Z is given.

XI can be a row vector, in which case it specifies a matrix with
constant columns. Similarly, YI can be a column vector and it
specifies a matrix with constant rows.

ZI = INTERP2(Z,XI,YI) assumes X=1:N and Y=1:M where [M,N]=SIZE(Z).
ZI = INTERP2(Z,NTIMES) expands Z by interleaving interpolates between
every element, working recursively for NTIMES. INTERP2(Z) is the
same as INTERP2(Z,1).

ZI = INTERP2(...,METHOD) specifies alternate methods. The default
is linear interpolation. Available methods are:

'nearest' - nearest neighbor interpolation
'linear' - bilinear interpolation
'spline' - spline interpolation
'cubic' - bicubic interpolation as long as the data is
uniformly spaced, otherwise the same as 'spline'

For faster interpolation when X and Y are equally spaced and monotonic,
use the syntax ZI = INTERP2(...,*METHOD).

ZI = INTERP2(...,METHOD,EXTRAPVAL) specificies a method and a scalar
value for ZI outside of the domain created by X and Y. Thus, ZI will
equal EXTRAPVAL for any value of YI or XI which is not spanned by Y
or X respectively. A method must be specified for EXTRAPVAL to be used,
the default method is 'linear'.

All the interpolation methods require that X and Y be monotonic and
plaid (as if they were created using MESHGRID). If you provide two
monotonic vectors, interp2 changes them to a plaid internally.
X and Y can be non-uniformly spaced.

For example, to generate a coarse approximation of PEAKS and
interpolate over a finer mesh:
[x,y,z] = peaks(10); [xi,yi] = meshgrid(-3:.1:3,-3:.1:3);
zi = interp2(x,y,z,xi,yi); mesh(xi,yi,zi)

Class support for inputs X, Y, Z, XI, YI:
float: double, single
百度网友53ce302
2013-01-12 · TA获得超过134个赞
知道答主
回答量:26
采纳率:0%
帮助的人:23.7万
展开全部
简单来说就是 二维数据插值
下面是matlab给出的解释
INTERP2 2-D interpolation (table lookup).
ZI = INTERP2(X,Y,Z,XI,YI) interpolates to find ZI, the values of the
underlying 2-D function Z at the points in matrices XI and YI.
Matrices X and Y specify the points at which the data Z is given.

XI can be a row vector, in which case it specifies a matrix with
constant columns. Similarly, YI can be a column vector and it
specifies a matrix with constant rows.

ZI = INTERP2(Z,XI,YI) assumes X=1:N and Y=1:M where [M,N]=SIZE(Z).
ZI = INTERP2(Z,NTIMES) expands Z by interleaving interpolates between
every element, working recursively for NTIMES. INTERP2(Z) is the
same as INTERP2(Z,1).

ZI = INTERP2(...,METHOD) specifies alternate methods. The default
is linear interpolation. Available methods are:

'nearest' - nearest neighbor interpolation
'linear' - bilinear interpolation
'spline' - spline interpolation
'cubic' - bicubic interpolation as long as the data is
uniformly spaced, otherwise the same as 'spline'

For faster interpolation when X and Y are equally spaced and monotonic,
use the syntax ZI = INTERP2(...,*METHOD).

ZI = INTERP2(...,METHOD,EXTRAPVAL) specificies a method and a scalar
value for ZI outside of the domain created by X and Y. Thus, ZI will
equal EXTRAPVAL for any value of YI or XI which is not spanned by Y
or X respectively. A method must be specified for EXTRAPVAL to be used,
the default method is 'linear'.

All the interpolation methods require that X and Y be monotonic and
plaid (as if they were created using MESHGRID). If you provide two
monotonic vectors, interp2 changes them to a plaid internally.
X and Y can be non-uniformly spaced.

For example, to generate a coarse approximation of PEAKS and
interpolate over a finer mesh:
[x,y,z] = peaks(10); [xi,yi] = meshgrid(-3:.1:3,-3:.1:3);
zi = interp2(x,y,z,xi,yi); mesh(xi,yi,zi)

Class support for inputs X, Y, Z, XI, YI:
float: double, single
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
中韩村hww
2013-01-17
知道答主
回答量:35
采纳率:0%
帮助的人:11万
展开全部
ZI=interp2(X,Y,Z,XI,YI,method),
其中X和Y为由自变量组成的数组,X与Y尺寸相同,Z为2维函数数组。
XI和YI为插值点的自变量数组,method为插值方法选项,提供了4种方法;‘nearest’、‘linear’、‘spline’、‘cubic’等。
二维插值主要应用于图形图像处理和三维曲线拟合等领域。
本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(1)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式