Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Please enter the matlab code for the following questions
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions