필터 지우기
필터 지우기

How to get the vector from a Point orthogonal to a Vector

조회 수: 2 (최근 30일)
Oliver Kumar
Oliver Kumar 2016년 3월 2일
댓글: Oliver Kumar 2016년 3월 2일
I have three points A, B, C Now I have built the vector A-B. What I need now, is a vector from C which is orthogonal to the vector A-B. The Vector (vecX) has to point to from C to the vector A-B. What I did this:
%vecX = abs(cross(A - B, C - A))./(A - B);
But I thiks this givs me onle the disctence from C to A-B and not the direction. Do you have any ideas how I can solve the problem? Thank you!

채택된 답변

Torsten
Torsten 2016년 3월 2일
x=(A-C)-dot(A-C,A-B)/dot(A-B,A-B)*(A-B)
Best wishes
Torsten.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by