fastinterpcol - Fast 1D interpolation along column dimension

Version 1.0.0 (2,25 KB) von Tan Nguyen
This is an expansion of the interp1q function of Matlab, aiming to improve the speed for 2D interpolation by using vectorization.
117 Downloads
Aktualisiert 17 Jan 2019

Lizenz anzeigen

The Matlab's built-in `interp1q` function is known to be a very fast linear interpolator that can deal with non-uniform grids. However, it only supports 1d input vectors. Interpolating over multiple columns of a 2D matrix will require multiple calls of `interp1q` using the for loop, which is very slow.

This source code implements `fastinterpcol`, a vectorized version of `interp1q`. This function does very fast interpolation along the column dimension of a 2D matrix. Interpolation along the row dimension can be also done simply by transposing the input before calling the function.

Experimental results show that `fastinterpcol` is at least 2x faster than `interp1q` for a matrix of 100 columns.

Zitieren als

Tan Nguyen (2024). fastinterpcol - Fast 1D interpolation along column dimension (https://www.mathworks.com/matlabcentral/fileexchange/70015-fastinterpcol-fast-1d-interpolation-along-column-dimension), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2018b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Interpolation finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Veröffentlicht Versionshinweise
1.0.0