scatteredInterpolant
Interpolate 2-D or 3-D scattered data
Description
UsescatteredInterpolant
在2-D或3-D数据集上执行插值scattered data.scatteredInterpolant
returns theinterpolantF
对于给定的数据集。你可以评估F
at a set of query points, such as(XQ,YQ)
in 2-D, to produce interpolated valuesVQ = F(XQ,YQ)
.
UsegriddedInterpolant
执行插值gridded data.
创建
Syntax
Description
creates an empty scattered data interpolant object.F
= scatteredInterpolant
创建一个符合表格表面的插值v=F(XG.ydF4y2Ba,yg.ydF4y2Ba).vectors.F
= scatteredInterpolant(XG.ydF4y2Ba
,yg.ydF4y2Ba
,v
)XG.ydF4y2Ba
和yg.ydF4y2Ba
specify the(x,y)
coordinates of the sample points.v
is a vector that contains the sample values associated with the points(x,y)
.
creates a 3-D interpolant of the formv=F(XG.ydF4y2Ba,yg.ydF4y2Ba,z).F
= scatteredInterpolant(XG.ydF4y2Ba
,yg.ydF4y2Ba
,z
,v
)
specifies an interpolation method:F
= scatteredInterpolant(___,Method
)'nearest'
,'线性'
, 要么'natural'
.SpecifyMethod
as the last input argument in any of the first three syntaxes.
specifies both the interpolation and extrapolation methods. PassF
= scatteredInterpolant(___,Method
,ExtrapolationMethod
)Method
和ExtrapolationMethod
together as the last two input arguments in any of the first three syntaxes.
Method
can be:'nearest'
,'线性'
, 要么'natural'
.ExtrapolationMethod
can be:'nearest'
,'线性'
, 要么'none'
.
Input Arguments
特性
Usage
UsescatteredInterpolant
to create theinterpolant,F
.Then you can evaluateF
在使用以下任何语法中的特定点:
Vq = F(Pq)
Vq = F(Xq,Yq)
Vq = F(Xq,Yq,Zq)
Vq = F({xq,yq})
Vq = f({xq,yq,zq})
Vq = F(Pq)
specifies the query points in the matrixPQ.
.每一行PQ.
contains the coordinates of a query point.Vq = F(Xq,Yq)
和Vq = F(Xq,Yq,Zq)
将查询点指定为2或三个相同大小的矩阵。Vq = F({xq,yq})
和Vq = f({xq,yq,zq})
指定查询点作为grid vectors.Use this syntax to conserve memory when you want to query a large grid of points.
Examples
More About
Tips
评估a更快
scatteredInterpolant
objectF
在许多不同的查询点集中,它是用函数分别计算插值griddata
要么栅格坦
.For example:% Fast to create interpolant F and evaluate multiple timesf =散射interpolant.(X,Y,V) v1 = F(Xq1,Yq1) v2 = F(Xq2,Yq2)用griddata单独计算插值的百分比慢v1 = griddata(X,Y,V,Xq1,Yq1) v2 = griddata(X,Y,V,Xq2,Yq2)
要更改插值示例值或插值方法,更新内插对象的属性更有效
F
than it is to create a newscatteredInterpolant
目的。当你更新时Values
要么Method
, the underlying Delaunay triangulation of the input data does not change, so you can compute new results quickly.Scattered data interpolation with
scatteredInterpolant
使用数据的Delaunay三角测量,因此可以对采样点中的缩放问题敏感XG.ydF4y2Ba
,yg.ydF4y2Ba
,z
, 要么P
.When this occurs, you can usenormalize
to rescale the data and improve the results. See具有不同量大的数据了解更多信息。
Algorithms
scatteredInterpolant
uses a Delaunay triangulation of the scattered sample points to perform interpolation[1].
References
[1] Amidror,Isaac。“电子成像系统的分散数据插值方法:调查”。电子成像杂志.2号卷。11日,2002年4月,pp. 157–176.