• Advertisement

Archived

This topic is now archived and is closed to further replies.

Line that most closely passes through a set of points?

This topic is 5213 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites

  • Advertisement