Algorithm to draw a straight line through given points?

1 次查看(过去 30 天)
Let's suppose I have bunch of random points as shown in the figure below. Now, is there any algorithm in matlab that would draw a straight line through these points as long as the distance from this line to all points along the line is less than a threshold value (d<threshold)

采纳的回答

Image Analyst
Image Analyst 2015-4-6
编辑:Image Analyst 2018-8-28
See my polyfit() demo, attached below the image.
You will have to do two passes. One to get the line, then get the distances, then delete the data points that are too far, then run it again on the remaining points.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by