scatteredInterpn
Performs linear interpolation of a n-dimensional scattered data described
by the points X and values V. The interpolation is based on a n-dimensional
delaunayn triangulation. A barycentric interpolation scheme is employed for
all query points using tsearchn.
For slightly faster interpolation, choose nearest neighbour interpolation.
The nearst interpolation uses dsearchn instead of tsearchn.
Obs, 1-dimensional data is not supported, use interp1 instead.
Matlabs scatteredInterpolant class similarly allows for linear and nearest
neighbour scattered data interpolation. It is also significantly faster than
this function and have support for extrapolation. However, it can only handle
2D and 3D scatter data, whereas this function can handle any number of
dimensions.
Syntax:
VI = scatteredInterpn(X, V, XI)
VI = scatteredInterpn(X, V, XI, T)
[VI, T] = scatteredInterpn(X, V, XI)
VI = scatteredInterpn(___, method)
VI = scatteredInterpn(___, method, extrapval)
Input:
X - coordinates of points - [nPoints, nDim]
V - value(s) at points - [nPoints, nData]
XI - interpolation query points - [nInterpPoints, nDim]
Optional:
T - delaunayn triangulation - T = delaunayn(X);
Note, can be computed once and re-used for another data set V or for an
additional set of interpolation points XI in subsequent function calls.
method - 'linear','l' (default) OR 'nearest','n' - interpolation method
extrapval - extrapolation value, NaN (default)
Output:
VI - interpolated values - [nInterpPoints, nData]
T - delaunayn triangulation - T = delaunayn(X);
Comments:
Computationally, the main bottleneck in this function is the call to tsearchn
or dsearchn. Specifically because the underlying matlab mex-function tsrchnmx
needs transposed coordinate data.
See also: delaunayn, tsearchn, dsearchn, scatteredInterpolant, interpn
引用格式
Johan Winges (2024). scatteredInterpn (https://github.com/johwing/matlab_scatteredInterpn), GitHub. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!无法下载基于 GitHub 默认分支的版本
版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.1.0.0 | Fixed submission name |
|
|
1.0.0.0 |
|