finding normal vector to a line in 2D

35 visualizaciones (últimos 30 días)
bes
bes el 11 de Oct. de 2011
I know the two points in a line. (x1,y1), (x2,y2). how can I find the normal vector to that line?

Respuesta aceptada

William
William el 11 de Oct. de 2011
Find the distance between the two points and then
norm(distance,2)
Most vectors need to have the zero vector as their starting point. Otherwise they have problems obeying all the rules of vector space. the norm(A,2) finds the second norm of a vector starting from zero. Which is basically the length.
to find a normal vector you need to divide the vector by it's second norm.

Más respuestas (1)

Walter Roberson
Walter Roberson el 11 de Oct. de 2011
The normal vector will be one with a slope of -1 divided by the slope of the line segment.

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by