Line that most closely passes through a set of points?
I have a set of points in the order that they should form the line, but they do not perfectly lie on the line. How would I get the equation of the line that most closely lies on the points?
Help would be much appreciated.
Edit: Actually all I need is the gradient. What im gonna do now is get the gradient of each segment between the points, and average their gradient. If anyone knows of a better solution, please say.
[edited by - FearedPixel on November 16, 2003 1:00:26 PM]
I believe the method of least squares is what is normally used.
http://mathworld.wolfram.com/LeastSquaresFitting.html
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=least+squares&btnG=Google+Search
http://mathworld.wolfram.com/LeastSquaresFitting.html
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=least+squares&btnG=Google+Search
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement