Question: 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
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 magnitudes and the cosine of the angle between their tails as in
{a} · {b} = ab cosθ
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 θ, {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 following cases:
Step by Step Solution
3.33 Rating (147 Votes )
There are 3 Steps involved in it
Here is an Mfile function that takes two input vectors a and b in Cartesian form and returns the ang... View full answer
Get step-by-step solutions from verified subject matter experts
