Discrete points on a curve
Show older comments
I have a series of smooth and continuous x,y points that make up a simple curve that is fitted to the data. I have a fixed number of breakpoints ,say 20, that I can put anywhere in the x,y space such that they best represent the curve with minimal error. The endpoints are fixed. I'm not sure where to begin.
7 Comments
Walter Roberson
on 6 Mar 2014
To check: the equation of the (fitted) curve is known? So the question about minimal error has to do with round-off in computations?
Norman
on 6 Mar 2014
Walter Roberson
on 6 Mar 2014
Represent the curve with minimum error: is that represent the actual points, or represent the fitted (computed) curve?
Norman
on 6 Mar 2014
Walter Roberson
on 7 Mar 2014
points placed on the curve incur round-off error compared to the theoretical curve.
One possibility that would potentially make sense is if Norman wants to place 20 points so that a polynomial fitted through the 20 points would have minimum error compared to the (calculated) curve. Though in that case you need to be able to adjust to odd or even number of points so as to match the parity of the zero crossings.
Answers (1)
Image Analyst
on 7 Mar 2014
0 votes
If you have a quadratic, you might think that you need more points around the apex because the curvature is high. So you could pick points based on the derivative (curvature) of the curve - more at highly curved parts and fewer at the more "straight" parts of the quadratic. However the "straight" parts of the quadratic legs are very steep and so there is a way bigger residual out there (at lines drawn between the limited number of sample points) than around the apex. Sounds a lot more complicated that it appears, so I'd wait to see if Roger Stafford can rescue you. He always has good answers for things like this.
Categories
Find more on Get Started with Curve Fitting Toolbox 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!