MATLAB trilinear interpolation

A Matlab mex function to perform trilinear interpolation.

Sie verfolgen jetzt diese Einreichung

I'm working with large 3D data and have to interpolate in 3D space. With Matlab's interp3 function my computer hangs because of high memory requirement of vectorized interp3. So i decided to write a mex file to sequencially interpolate the data. There is a speed gain up to 5x.
This function acts as matlab's interp3 function when interp3 is set to linear. However there are some differences. First of all trilinear requires monotonically spaced input grid such as produced by meshgrid. Also trilinear uses zero as extrapolaiton value (can be changed as an input parameter).
This is my first mex code and can be improved such as this code can be en equivalent of interp3.

Zitieren als

Mehmet OZTURK (2026). MATLAB trilinear interpolation (https://de.mathworks.com/matlabcentral/fileexchange/19687-matlab-trilinear-interpolation), MATLAB Central File Exchange. Abgerufen .

Kategorien

Mehr zu Interpolating Gridded Data finden Sie in Help Center und MATLAB Answers

Allgemeine Informationen

Kompatibilität der MATLAB-Version

  • Kompatibel mit allen Versionen

Plattform-Kompatibilität

  • Windows
  • macOS
  • Linux
Version Veröffentlicht Versionshinweise Action
1.2.0.0

Source code is included instead of executables.

1.0.0.0

Updated Demo File