Finding the point

2 次查看(过去 30 天)
bes
bes 2011-10-11
I know the equation of a line N. there is a point P =(a,b) lying on the same plane. (not in that line) how can i find whether that point (a,b) lies right hand side of that line N or lefthand side? shall i find that by finding the normal vector to that line N

采纳的回答

Igor de Britto
Igor de Britto 2011-10-11
Right or left hand side means above or under the line?
If so:
line_eq = k*x + n
P = (a,b)
if k*a + n > b
'under the line'
elseif if k*a + n < b
'above the line'
else
'on the line'
end
  3 个评论
Walter Roberson
Walter Roberson 2011-10-11
m = k
c = n
and now k*x + n is the same as m*x + c
bes
bes 2011-10-11
thankyou. this works fine

请先登录,再进行评论。

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by