On 7 August 2014 11:05, Camille <camillechambon@yahoo.fr> wrote:
Thanks for your answer. Actually, data(t) is a sinusoidal function. Thus I
can not extend the interpolation data linearly. I edited my question on
StackOverflow accordingly.

Note that you are evaluating it very close to the boundary, so the interpolation effects will not be so bad. You can check the sensibility comparing the results with a purposefully "wrong" interpolation, like the same linear interpolation but with the opposite slope; but I bet the differences are going to be slim.

If you know your data is sinusoidal, you can use that to make an even better estimation of the next value. Essentially, you need to provide the ODE solver with a way to estimate the derivatives of your function at any point.


/David