how can i solve this angle between vectors?

回答(2 个)

Andrei Bobrov
Andrei Bobrov 2015-12-4
编辑:Andrei Bobrov 2015-12-4

Law of cosines

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

类别

回答:

2023-3-15

Community Treasure Hunt

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

Start Hunting!

Translated by