I am given data sets v and r to spline over an interval and graph. I have to use spline and ppl intervals to accomplish this however when I do this the spline is nothing like the data plot.
Best Answer
Hi Dhruv.
your choice of a = 0.125 is kind of messing things up, because it's well above where the data ends. If you go only to the end of the data as in figure 2, the results are more sensible. Also,
spY = spline(v,r,XX);
is simpler than the two commands involving polyval.
‘Spline interpolation using not-a-knot end conditions. The interpolated value at a query point is based on a cubic interpolation of the values at neighboring grid points in each respective dimension.’
It does not appear to be the same as 'cubic'. According to the documentation, 'cubic' is currently the same as 'pchip'.
Best Answer