Hi, thanks.
Could you provide an example where the current version of interpol fails with a scalar 3rd argument?
Because if I do:
GDL> x=[findgen(360)/360]!PI2
GDL> y=sin(x)
GDL> plot,x,y
GDL> u=4
GDL> interp=interpol(y,x,u)
GDL> print,interp
-0.754710
GDL> oplot,[4],[interp],psym=4
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, thanks.
Could you provide an example where the current version of interpol fails with a scalar 3rd argument?
Because if I do:
GDL> x=[findgen(360)/360]!PI2
GDL> y=sin(x)
GDL> plot,x,y
GDL> u=4
GDL> interp=interpol(y,x,u)
GDL> print,interp
-0.754710
GDL> oplot,[4],[interp],psym=4
It currently fails if the scalar 3rd argument goes outside of the bounds of the 'x' array. Changing 'u=4' to 'u=8' will trigger the problem.
Indeed! Thanks, I've commited your patch in the cvs after test.