How can I obtain the analytical expression (polynomial) of the spline curve from a curve fitting?
Show older comments
I have extracted data from some graphs (images) and then I curve fitted that data to obtain some spline curves. What I need is the polynomial of those spline, the f(x) that draw the initial graphs, the function that relates the x and y points. How can I do that? Thanks!
3 Comments
KSSV
on 3 Mar 2022
pp = spline(x,y)
In the above pp has the information you want.
Mathieu NOE
on 3 Mar 2022
Radu Andrei Matei
on 3 Mar 2022
Accepted Answer
More Answers (1)
What I need is the polynomial of those spline
A spline consists of many polynomials stuck together, not just one.Also, there are a number of different forms in which spline fits can exist in Matlab, and we don't know which ones you have. If you really need to break down a spline, and it is in the form of a pp structure you could use unmkpp. More likely, you used cftool, in which case you have a cfit object.
Regardless, there is a reason that Matlab doesn't provide you with an analytical form for the spline. It's because far better tools are provided to post-process a fit,
1 Comment
Radu Andrei Matei
on 3 Mar 2022
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!