how can i solve this angle between vectors?

1 visualizzazione (ultimi 30 giorni)
nurul aqilah
nurul aqilah il 4 Dic 2015
Risposto: VBBV il 15 Mar 2023
Find the angle between the vectors a and b given that a = 3; b = 5; and a-b = 7:

Risposte (2)

Andrei Bobrov
Andrei Bobrov il 4 Dic 2015
Modificato: Andrei Bobrov il 4 Dic 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 il 15 Mar 2023
a = 3;
b = 5;
c = 7;
alpha = acosd((a.^2 + b.^2 - (c).^2)./(2*a*b))
alpha = 120.0000

Categorie

Scopri di più su Numerical Integration and Differential Equations in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by