INTERPNS

N-dimensional simplicial interpolation
783 téléchargements
Mise à jour 31 mars 2011

Afficher la licence

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.

Citation pour cette source

John D'Errico (2024). INTERPNS (https://www.mathworks.com/matlabcentral/fileexchange/30932-interpns), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2010b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Interpolation dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0