Slope of the spline interpolation

Forums General questions about Fortran programming Slope of the spline interpolation

This topic contains 3 replies, has 2 voices, and was last updated by Jay Kang July 24, 2020 at 5:24 pm.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1852

    Jay Kang
    User

    Hi Fabian!

    Again, thank you for this great book.

    I was wondering whether there is a function/subroutine which provides the first order and second-order derivative of the spline interpolation. If there is none, I would have to just plug in the coefficients to the slope (which is just first-order and second-order derivative with respect to the grid variables.)

    Thanks a lot!

    Best,
    Jay Kang

    #1855

    Jay Kang
    User

    Actually I just read Habermann and Kindermann (2007). So I bet what I need to do is take the first order derivative of the Pi function (basis function) with respect to t. Then I guess I can get plug in the coefficient to the first order derivative of basis function with respect to t. Would this be a right approach?

    Thanks again!

    Jay Kang

    #1858

    Fabian Kindermann
    Moderator

    Dear Jay Kang,

    sorry for taking a while to respond. This is exactly correct. You might wanna take a look at the functions spline1 and spline1_grid in the toolbox. If you modify these functions such that the return the derivative of the basis function, then you will immediately get to the derivative of the spline function.

    In the one-dimensional case this is super easy. It gets a little more tricky in the multi-dimensional case, because you will have to compute the full Jacobian. I guess this is why I didn’t code it up in the toolbox. But I will put it on my todo-list.

    Thanks for asking this great question and great that you found the solution on your own.

    Best,
    Fabian

    #1871

    Jay Kang
    User

    Thank you very much Fabian for your clarification!

    Best,
    Jay Kang

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.