Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me with the questions that are highlighted, please only help if you know how to do them 100% 5 Linear Transformations Create the

image text in transcribedimage text in transcribedplease help me with the questions that are highlighted, please only help if you know how to do them 100%

5 Linear Transformations Create the following m-file and save it as lintr2.m function lintr2(obj, A) whitebg('w') plot(obj (1,:), obj(2,:), 'k') hold orn y=A*obj; display(y.) plot (y(1,:), y(2, : ) , r') hold off This m-file plots the points in the matrix obj, and then plots the points in the matrix A+obj. Now reopen MATLAB if it was not already open (do not forget to use the diary command). Enter the following matrix; it describes the vertices in a drawing of a house TYPE: house- [O 0; 0 1; 1 2; 2 1; 2 0; 3 0; TYPE: 1.75 0; 1.75 .5; 1.25.5; 1.25 0; -1 0]' Do not forget the transpose! To see the house, TYPE: 1intr2 (house, eye (2)) Create a matrix that reflects across the x-axis TYPE: reflectX = [10; 0-1] TYPE: lintr2(house, reflectX) The house should be in black and its reflection about the -axis in red. Do the same thing for the y-axis TYPE: reflectY= [-10; 01] TYPE: lintr2 (house, reflectY) Explain what happened COMMENT: % [an explanation of what happened] To rotate the house 30 degrees counterclock wise, sin (pi/6) cos (pi/6)] TYPE: TYPE: rot30 = [cos (pi/6) -sin (pi/6): lintr2 (house, rot30) This should rotate your house 30 degrees. Can you rotate your house 45 degrees? 5 Linear Transformations Create the following m-file and save it as lintr2.m function lintr2(obj, A) whitebg('w') plot(obj (1,:), obj(2,:), 'k') hold orn y=A*obj; display(y.) plot (y(1,:), y(2, : ) , r') hold off This m-file plots the points in the matrix obj, and then plots the points in the matrix A+obj. Now reopen MATLAB if it was not already open (do not forget to use the diary command). Enter the following matrix; it describes the vertices in a drawing of a house TYPE: house- [O 0; 0 1; 1 2; 2 1; 2 0; 3 0; TYPE: 1.75 0; 1.75 .5; 1.25.5; 1.25 0; -1 0]' Do not forget the transpose! To see the house, TYPE: 1intr2 (house, eye (2)) Create a matrix that reflects across the x-axis TYPE: reflectX = [10; 0-1] TYPE: lintr2(house, reflectX) The house should be in black and its reflection about the -axis in red. Do the same thing for the y-axis TYPE: reflectY= [-10; 01] TYPE: lintr2 (house, reflectY) Explain what happened COMMENT: % [an explanation of what happened] To rotate the house 30 degrees counterclock wise, sin (pi/6) cos (pi/6)] TYPE: TYPE: rot30 = [cos (pi/6) -sin (pi/6): lintr2 (house, rot30) This should rotate your house 30 degrees. Can you rotate your house 45 degrees

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

Step: 3

blur-text-image

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago