Question: For MATlab, youre the best thank you! Write a function named plotRotation that takes in two vectors, x and z, and a vector th. Your
Write a function named plotRotation that takes in two vectors, x and z, and a vector th. Your function should plot three plots in the same figure by using the subplot command. The figure should have 1x3 plots. The plots should be as follows: a. z vs. x, titled 'z vs. x'. Note that you will have to use plot3(o to 8. correctly plot this in the x-z plane rather than the x-y plane a plot() would do. Also, you should use view(0, o) to make the plot produced by plot3) show up as 2-D b. z vs. x rotated around the x-axis using mesh() with flat shading and a square axis, titled 'z vs. x about x using mesh c. z vs. x rotated around the z-axis using surf) with interp shading and a square axis, titled 'z vs. x about z using surf For plots b and c, the input vector th should be used for your independent vector theta, which is used to convert from polar-to- Cartesian coordinates. Don't forget to title and label each of the three plots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
