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

Walter Roberson
Walter Roberson 2014년 3월 6일
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
Norman 2014년 3월 6일
The equation is known (computed).
Norman
Norman 2014년 3월 6일
편집: Norman 2014년 3월 6일
So lets say I have an equation that's Y=3x^2 + 4X + 2. I want to place 20 points in the x-y space such that the sum of squared errors are minimal. I don't expect that any of the placed points will actually be on the line, except that two end points are fixed (so 18 points go somewhere in space to minimize the error).
Walter Roberson
Walter Roberson 2014년 3월 6일
Represent the curve with minimum error: is that represent the actual points, or represent the fitted (computed) curve?
Norman
Norman 2014년 3월 6일
Sorry, represent the fitted curve.
Matt J
Matt J 2014년 3월 7일
편집: Matt J 2014년 3월 7일
It's not clear when and why error is incurred. Since you know the equation, and if points placed on the curve exactly incur zero error, then why not simply choose 20 points that satisfy the equation exactly?
Walter Roberson
Walter Roberson 2014년 3월 7일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2014년 3월 7일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

태그

질문:

2014년 3월 6일

답변:

2014년 3월 7일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by