how can i solve this angle between vectors?

1 vue (au cours des 30 derniers jours)
nurul aqilah
nurul aqilah le 4 Déc 2015
Réponse apportée : VBBV le 15 Mar 2023
Find the angle between the vectors a and b given that a = 3; b = 5; and a-b = 7:

Réponses (2)

Andrei Bobrov
Andrei Bobrov le 4 Déc 2015
Modifié(e) : Andrei Bobrov le 4 Déc 2015

Law of cosines

a = 3; 
b = 5;
c = 7; % c = a - b
alpha = acos((a.^2 + b.^2 - c.^2)./(2*a*b));

VBBV
VBBV le 15 Mar 2023
a = 3;
b = 5;
c = 7;
alpha = acosd((a.^2 + b.^2 - (c).^2)./(2*a*b))
alpha = 120.0000

Catégories

En savoir plus sur Numerical Integration and Differential Equations 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