MATLAB trilinear interpolation
by Mehmet OZTURK
23 Apr 2008
(Updated 13 Oct 2008)
A Matlab mex function to perform trilinear interpolation.
|
Watch this File
|
| File Information |
| Description |
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. |
| MATLAB release |
MATLAB 7.6 (R2008a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 28 Apr 2008 |
Added demo file for usage example |
| 13 Oct 2008 |
Updated Demo File |
|
Contact us at files@mathworks.com