I've created a spline fit using curve fitting
xdat = [1;2;3;4;5;6;7;8;9;10]ydat = [2;3;5;7;9;14;24;46;57;58]SplineFit = fit(xdat, ydat, 'smoothingspline');
I can plot this using simply
plot(fitA)
However, what I really want to do is use this plot to find the y values for x values that are not input x values. Sort of an interpolation, but using the spline fit I used.
i.e. I want to find ydat values where xdat=[1.2; 3.6; 6.2; 7.8], using SplineFit
If I were using polynomials, I know I would use the polyval function for this but I don't know what to use considering I've used a smoothing spline.
Any help appreciated
Best Answer