From: Martin on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <h615ih$af8$1(a)fred.mathworks.com>...

> Definitively. IMO, INTERP1 is one of the slowest function in Matlab for the task it carry out. I have written my own Mex interp1. Below is the code.

Bruno,

thank you very much for this code snippet! I'm working with an algorithm which relies very heavily on interpolation (omega-k for synthetic aperture), and this really helped speed up my code. Great! You should consider submitting it to the File Exchange.

--
Martin
From: Jan Simon on
Dear Jaka!

> Is there a faster alternative for the matlab interp1q interpolation function? Would using a linear interpolation in mex file be considerably faster?

This is faster than interp1q, epsecially for equidistant steps and matrices:
http://www.mathworks.com/matlabcentral/fileexchange/25463

Good luck, Jan
From: Matt J on
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hvab5l$fgv$1(a)fred.mathworks.com>...
> Dear Jaka!
>
> > Is there a faster alternative for the matlab interp1q interpolation function? Would using a linear interpolation in mex file be considerably faster?
>
> This is faster than interp1q, epsecially for equidistant steps and matrices:
> http://www.mathworks.com/matlabcentral/fileexchange/25463
==============

I just want to add that it would be good to have implementations of the transpose of all of these fast interpolators as well. That would help with evaluating the gradients of functions that involve interpolation operations.