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
Zitieren als
Johan Winges (2024). scatteredInterpn (https://github.com/johwing/matlab_scatteredInterpn), GitHub. Abgerufen .
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Versionen, die den GitHub-Standardzweig verwenden, können nicht heruntergeladen werden
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.1.0.0 | Fixed submission name |
|
|
1.0.0.0 |
|