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.
인용 양식
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. 검색됨 .
MATLAB 릴리스 호환 정보
플랫폼 호환성
Windows macOS Linux카테고리
- MATLAB > Mathematics > Interpolation >
태그
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!버전 | 게시됨 | 릴리스 정보 | |
---|---|---|---|
1.0.0 |