Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Why we have 3 functions lspline, pspline and cspline? Can we have only one spline?
Solved! Go to Solution.
Hi,
There is a fourth spline possibility. Call it a dspline? A spline can be put through n points in the XY plane if you also specify the derivatives or slope at each end point of the spline. I used to do this with roller coasters so the curved track could match slope of straight portions at start/finish. Using this method no extrapolation is possible.
The four splines looking closely at first two points. Each is subtly different.
Hi,
There is a fourth spline possibility. Call it a dspline? A spline can be put through n points in the XY plane if you also specify the derivatives or slope at each end point of the spline. I used to do this with roller coasters so the curved track could match slope of straight portions at start/finish. Using this method no extrapolation is possible.
The four splines looking closely at first two points. Each is subtly different.
As "terryhendicott" points out, each option provides the flexibility to more closely fit a cubic spline representation to the function/response you may need to model, because of the end-point conditions. I've used 2 variations in the past to mimic the behavior of a system that requires each of those two conditions at their endpoints. It is very useful to have these options available to us.
Very nice. I could have used this several times over the last few years (instead of my own home-brewed kludge).
SMath has lspline and pspline. With 2 or 3 arguments
Two picture from the chapter 15 Hydropower "Thoughts and Calculations when Looking at a Banknote or Spline Interpolation" of the book
STEM Problems with Mathcad and Python - 1st Edition - Valery Ochkov - (routledge.com)
To be honest, I was expecting such an answer. I have a problem and I didn't solve it with the function lspline, but I solved it with a function cspline.
I have a problem and I didn't solve it with the function lspline, but I solved it with a function linterp.