%% Find the angle between the vectors a=[1;1;0] and b=[0;1;1]
% We obtain that the angle is pi/3 or 60 degrees.
%
% Note that the points [0;0;0], [1;1;0], [0;1;1] form the vertices of an equilateral triangle.
a = sym([1;1;0]); b = sym([0;1;1]);
q = dot(a,b)/(norm(a)*norm(b))
theta = acos(q)

arrow3(a,'LineWidth',2); hold on
arrow3(b,'LineWidth',2); hold off
nice3d; view(45,20); label(a,'a',b,'b')


