Question: Please enter the matlab code for the following questions 3. a) Rotation of coordinates of a point (x, y) about the origin can be carried
3. a) Rotation of coordinates of a point (x, y) about the origin can be carried out by 's cos() x-sin(0) y y'-sin() x + cos() y [cos() orbl-[sin(0) -sin(0) cos() y' | | sin( Where (x, y) is the coordinates of the point p, (x';y) is the new coordinates of the point p after rotation with angle in degrees. Write a function rotate.m file that can carry the calculation ofne coordinate after rotation using equations above. function np rotate(p,theta) b) Write a script file to test the function by using a triangle with coordinates pi-[1 1], p2-13 71 and p3-12 5] rotate 30 degrees. Plot triangles before and after its rotation (use fill or plot commands) (note: keep your files for the continuation on Exercise 10)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
