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

3 vues (au cours des 30 derniers jours)
Ceren Akcam
Ceren Akcam le 28 Nov 2021
Réponse apportée : HWIK le 28 Nov 2021
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.

Réponse acceptée

HWIK
HWIK le 28 Nov 2021
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.

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by