I am using matlab curve fitting toolbox to fit a curve to my data. I've used cubic spline, in the plot it's fitting well, but I would like to see the equation used. Is there a way to do that?
Also, is there a way to show the code? I mean the code was used to fit the curve by the toolbox?
Edit: I was able to get the code as the following, file->generate code. But still I need to find the equation, can anyone please tell me how I can do that?
Thank you.
I'm not sure how to display any equations on the graph, but you should be able to replicate the cubic spline interpolation using the commands spline and unmkpp.
Note that you will have a set of coefficients for each piece in the piecewise polynomial. For example: