Finding the point

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

 Respuesta aceptada

Igor de Britto
Igor de Britto el 11 de Oct. de 2011

1 voto

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 comentarios

bes
bes el 11 de Oct. de 2011
line eq = k*x = n means what? can you explain that interms of y=mx+c ( i know 2 points in that line (x1, y1) and (x2, y2))
Walter Roberson
Walter Roberson el 11 de Oct. de 2011
m = k
c = n
and now k*x + n is the same as m*x + c
bes
bes el 11 de Oct. de 2011
thankyou. this works fine

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Special Functions en Centro de ayuda y File Exchange.

Preguntada:

bes
el 11 de Oct. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by