Speed up 1D spline interpolation on matrix
4 views (last 30 days)
Show older comments
I have a NxM matrix named data and I need to spline interpolate each row of my matrix according to:
data(k,:)=spline( x , data(k,:).', x + shift(k,:).' );
where x is the original monotonously increasing spacing of each row. And the NxM matrix shift is the row- and column-dependent shift that I want to apply to each sample.
Is there a way to speed this up further? I found a lot of functions that claim a speed improvement of x10 for linear interpolation. Anything I can do for spline?
Matt J on 13 Sep 2017
Edited: Matt J on 14 Sep 2017
It might help to pose it as a 2D interpolation,
data=reshape( F([uu(:),vv(:)]), m,n) ;
Find more on Splines in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!