Question: 3.20 A Cartesian vector can be thought of as representing magnitudes along the x-, y-, and z-axes multiplied by a unit vector (i, j, k).

3.20 A Cartesian vector can be thought of as representing magnitudes along the x-, y-, and z-axes multiplied by a unit vector (i, j, k). For such cases, the dot product of two of these vectors {a} and {b} corresponds to the product of their mag- nitudes and the cosine of the angle between their tails as in {a}-{b} = ab cose The cross product yields another vector, {c} = {a} x {b}, which is perpendicular to the plane defined by {a} and {b} such that its direction is specified by the right-hand rule. Develop an M-file function that is passed two such vectors and returns 0, {c} and the magnitude of {c}, and generates a three-dimensional plot of the three vectors {a}, {b}, and {c) with their origins at zero. Use dashed lines for {a} and {b} and a solid line for {c}. Test your function for the fol- lowing cases: (a) a = [6 4 2]; b = [2 6 4]; (b) a = [3 2 -6]; b = [4 -3 1]; (c) a = [2 -2 1]; b = [4 2-4]; (d) a = [-1 0 0]; b = [0 -1 0]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
