A Cartesian vector can be thought of as representing magnitudesalong the x-, y-, and z-axes multiplied by a unit vector (i, j, k).For such cases, the dot product of two of these fectors {a} and {b}corresponds to the product of their magnitudes and the cosine ofthe angle between their tails as in {a}? {b} = abcos(theta)
The cross product yields another vector, {c} = {a} × {b} , whichis perpendicular to the plane defined by {a} and {b} such that itsdirection is specified by the right-hand rule. Develop and M-filefunction that is passed two such vectors and returns Theta, {c} andthe magnitude of {c}, and generates a three-dimensional plot of thethree vectors {a}, {b}, and {c} with their origins at zero. Usedashed lines for {a} and {b} and a solid line for {c}. Test yourfunction using the following 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 ];
I know how to find theta, {c}, and the magnitude of {c}, I justdon't know how to plot a 3-dimensional graph so if someone couldhelp me with that part of the code for MATLAB