Question about vector angular separation

4 views (last 30 days)
Wenwan
Wenwan on 12 Sep 2014
Answered: Andrei Bobrov on 18 Sep 2014
Find two unit vectors each of which makes equal angles with the vectors u = 4i + j +k, v = i + j, and w = 2i + j + k.

Answers (2)

Roger Stafford
Roger Stafford on 12 Sep 2014
This sounds like homework, so I will only give hints. The cosine of the angle between two vectors is equal to their dot product divided by the product of the magnitude (norms) of the two vectors. Utilizing this appropriately will give you two equations for the unknown vectors' components, and making them unit vectors gives you the third equation. You will find that these three equations have two solutions and these will be your desired vectors.

Andrei Bobrov
Andrei Bobrov on 18 Sep 2014
U1 = [4 1 1; 1 1 0;2 1 1]; %your vectors
U1norm = sqrt(sum(U1.^2,2));
U1e = bsxfun(@rdivide,U1,U1norm);
v = bsxfun(@minus,U1e(1:2,:),U1e(3,:));
v2 = cross(v(1,:),v(2,:));
out1 = v2/norm(v2);
angle1 = acosd(U1*out1'./U1norm);
out2 = -out1;
angle2 = acosd(U1*out2'./U1norm);

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!