Question: Solve using MATLAB -sino o cose] 4. The new 3D Cartesian coordinates of a vector after a rotation (X, Y., Z:) about n-axis at an

 Solve using MATLAB -sino o cose] 4. The new 3D Cartesian

Solve using MATLAB

-sino o cose] 4. The new 3D Cartesian coordinates of a vector after a rotation (X, Y., Z:) about n-axis at an angle are computed by (matrix multiplication): X X Y = Rn (O) Y Zr Iz where (X, Y, Z.) are the original coordinates of the vector before rotation) and R.(O) is the rotation matrix. The specific rotation matrix when rotating about the y-axis is defined as: coso 0 sine Ry(0) 0 1 0 Write a script to calculate the rotated X., Y., Z, vector using the above y-rotation matrix. The script must prompt the user to input() a 3x1 vector containing the x, y, and z coordinate of the original point, e.g. [x.; Y.; z.] from the Command Window. Additionally, prompt the user to input ( the desired angle of rotation in degrees from the Command Window. In your input statements, you must provide descriptive instructions to the user. Use disp() to output the coordinates of the rotated vector to the Command Window as shown: (7 Points) The new vector rotated ### degrees about the y-axis is: # #. # # # # # #. # # # # ##.## In the same m-file. LASTNAMES_Labo2scripts.m, add your properly commented code for problem 4 (after )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!