Answered step by step
Verified Expert Solution
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
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 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 degreesStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started