How to solve equation from curve fitting?
1 view (last 30 days)
Show older comments
This is probably really easy, however I am new in Matlab and cannot find a solution, so i have a graph and saved the coeffs in workspace after using basic fitting using spline so that it matches the curve, my question is i need to solve x for f(x)=Y, without guessing everytime how what x could be, how can i solve the equation so that i can find x easy and fast. Thanks for your time
2 Comments
Walter Roberson
on 24 Nov 2015
If I understand correctly, you have a set of piecewise polynomials (cubic coefficients with breakpoints) derived from a spline fit, and for given Y values you want to find the x that would give that Y.
The difficulty with this is that there would generally be multiple solutions.
For example you can fit a cubic spline to several periods of sin(x). If you then ask to solve for Y = 0, you are going to generate multiple results.
Do you want all of the results implied by the spline structure?
Answers (1)
See Also
Categories
Find more on Splines in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!