Extracting values from a smoothing spline fit
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 2 de Jun. de 2015
0 votos
I think that's what my attached demo does.

Categorías
Más información sobre Fit Postprocessing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!