speed of interp2 and bug with method cubic

Peter Cloetens cloetens at esrf.fr
Tue Oct 28 08:47:36 CDT 2008



John W. Eaton wrote:
> On 26-Oct-2008, Peter Cloetens wrote:
> 
> | 
> | 
> | John W. Eaton wrote:
> | > 
> | > On  4-Feb-2007, Peter Cloetens wrote:
> | > 
> | > | Hello,
> | > | 
> | > | It seems that the function interp2 got much slower at a certain point
> | > | (~factor 6 for linear interpolation and ~factor 40 for nearest
> | > | neighbour).
> | > |...
> | > | Reading the history and comparing the dates of the two versions of
> | > | interp2 I suspect that it is linked to the modification:
> | > | (XI,YI no longer need to be "meshgridded")
> | > |... 
> | > | Maybe a separate code should be foreseen in the case XI and YI are
> | > | vectors.
> | > 
> | > If you have a fix, how about submitting a patch?
> | > 
> | > Thanks,
> | > 
> | > jwe
> | > _______________________________________________
> | > Bug-octave mailing list
> | > Bug-octave at octave.org
> | > https://www.cae.wisc.edu/mailman/listinfo/bug-octave
> | > 
> | > 
> | 
> | Hello,
> | I would like to come back to the issue of the slow interp2. As it is used by
> | other functions (imrotate, imremap, ...) this is quite important.
> | I made a faster version:
> | http://www.nabble.com/file/p20177305/interp2.m interp2.m 
> 
> Will you please submit a patch that is relative to the version you
> started with?  That way we can see precisely what changes you made,
> and we will also avoid possibly wiping out other changes that might
> have been made in Octave's sources in the time since the version you
> started with was released.
> 
> jw
> e
I'm not familiar with creating a patch, but I will try to find out how 
to do this. I started with the version of interp2.m that comes with 
Octave 3.0.3, but the optimized code for XI and YI vectors is indeed 
older. The versions passes all tests and demos successfully, but I will 
check if there were intermediate changes that I would have missed.
Also, I think more test cases should be added especially for the cubic 
interpolation.
Peter


More information about the Bug-octave mailing list