Finding the point

1 Ansicht (letzte 30 Tage)
bes
bes am 11 Okt. 2011
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

Akzeptierte Antwort

Igor de Britto
Igor de Britto am 11 Okt. 2011
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 Kommentare
Walter Roberson
Walter Roberson am 11 Okt. 2011
m = k
c = n
and now k*x + n is the same as m*x + c
bes
bes am 11 Okt. 2011
thankyou. this works fine

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by