finding normal vector to a line in 2D
36 次查看(过去 30 天)
显示 更早的评论
I know the two points in a line. (x1,y1), (x2,y2). how can I find the normal vector to that line?
0 个评论
采纳的回答
William
2011-10-11
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.
0 个评论
更多回答(1 个)
Walter Roberson
2011-10-11
The normal vector will be one with a slope of -1 divided by the slope of the line segment.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Read, Write, and Modify Image 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!