I have a set of coordinates, for example x = [0 0 0 0] y = [1 0.9 1.1 1] or x = [1 2 3 4] y = [1 4 6 7], and I want to know if they are almost on a line. I can say the first exemple does and the second doesn't.
I tried with polyarea checking if the area is small enough but it's hard to define the crossing area value regarding the size of the polygon and, moreover, it gives the wrong answer if the polygon crosses itself, like in the first example.
Thank you in advice.
1 Comment
KALYAN ACHARJYA (view profile)
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/480927-check-if-a-set-of-coordinates-are-on-a-line#comment_747241
Sign in to comment.