Question: Q2. Python Question. The point of this question is to graphically show that the dot product of a vector with a unit vector has maximum

Q2. Python Question. The point of this question is to graphically show that the dot product of a vector with a unit vector has maximum amplitude when the two vectors are collinear. Consider a 2-D vector: A = 3 + 3 a. What is the angle that I makes with the x axis? b. Now consider a 2D unit vector at an angle with the positive x axis. You need to create this vector as a function of the angle . C. Create a for loop in python which cycles through various values of angle O. Start from O=0, all the way to 360 degrees with an increment of 1 degree. For each iteration in the loop (and, therefore, each value of angle ), you need to create the above unit vector. d. Inside the loop, calculate the dot product of with the unit vector. Save the result in a variable which has the same size as 0. e. Plot the dot product as a function of e. The plot should show a maximum value at the same angle as the answer to part a. f. What's the relation between this maximum value and the magnitude of
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
