how can i solve this angle between vectors?

1 次查看(过去 30 天)
Find the angle between the vectors a and b given that a = 3; b = 5; and a-b = 7:

回答(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));

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

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by