INTERPNS

N-dimensional simplicial interpolation
788 download
Aggiornato 31 mar 2011

Visualizza la licenza

Interpolation using interpn (or inter2, interp3, etc.) offers several options - linear, nearest, spline. However an interpolation method not offered is that based on a simplicial dissection of the n-d hypercube. Since a few people have asked me for it, here it is. The dissection of the cube used breaks each hyper-rectangle in the lattice into factorial(n) simplexes.

Why might one use this tool? The "linear" interpolation method used by interpn is actually a tensor product linear interpolant. In fact, that is not truly a linear interpolant. It has some properties that can be problematic. (Look at what that interpolant does along a diagonal of the lattice. That "linear" interpolant will often interesting behavior for something one expects to be linear.)

Interpns uses a simplicial interpolation scheme, breaking each hyper-rectangle of the lattice up into a set of factorial(n) simplexes. Within any simplex, the interpolation will always be purely linear. In addition, the interpolation along a choice diagonal of that lattice will always be truly linear. This is important for those who work in color manipulations for example, using n-d lookup tables.

Finally, the simplicial interpolant, based on barycentric coordinates within any given simplex, is assured never to create ringing behavior, as might be caused by a spline for example. And simplicial interpolation will be fairly efficient.

Cita come

John D'Errico (2025). INTERPNS (https://www.mathworks.com/matlabcentral/fileexchange/30932-interpns), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2010b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Interpolation in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0