comparing point coordination with line
Show older comments
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 :)
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!