comparing point coordination with line
이전 댓글 표시
I am trying to find out if a point is below or above a certain line (which I have its slope and y-intecept)
So asuuming I have two lines as in the figure:

and I have a point for example (10, -10), how do I test if it's below the black line (i.e.
), and to the right of purlple line (i.e.
);
), and to the right of purlple line (i.e.
); I am not sure how to compare a point with a line, the way I thought about is the following:
First make a line between the point (10,-10) and the intersection point of the two line (i.e. (8,2)), then check if the line has a slope less than black line slope and greater than purple line slope. This method, however, isn't effective, becuase it can have a slope within that range, but in the area I am targeting.
I would appreciate any guadince or help to solve this :)
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!