필터 지우기
필터 지우기

MATLAB script to find the angle (in degrees) between two vectorsScrip

조회 수: 4 (최근 30일)
Ceren Akcam
Ceren Akcam 2021년 11월 28일
답변: HWIK 2021년 11월 28일
How can I write a MATLAB script to find the angle (in degrees) between two vectors, Store the vectors in variables and calculate the angle.

채택된 답변

HWIK
HWIK 2021년 11월 28일
This has already been answered here:
CosTheta = max(min(dot(u,v)/(norm(u)*norm(v)),1),-1);
ThetaInDegrees = real(acosd(CosTheta));
Where u and v are your input vectors.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by