Question: ***THIS MUST BE DONE IN MATLAB*** 5. Consider the translated square MS in EXAMPLE 7. Apply to this square the reflection matrix that reflects about
***THIS MUST BE DONE IN MATLAB***
5. Consider the translated square MS in EXAMPLE 7. Apply to this square the reflection matrix that reflects about the line at 45 degrees. Plot the translated square in black and the reflected square in red. Use axis([-1,5,-1,5]) and plot the line y = x using the command plot([-1,5],[-1,5]);(this command plots the line connecting the points (1, 1) and (5, 5)). Add a legend and a grid. You should reproduce the figure below. Include the M-file and the figure.

6. Modify the M-file in EXAMPLE 8 adding translations that bring the square to its original position using 30 iterations and a single for loop. Include the M-file. You do not need to include the figure.


![and the reflected square in red. Use axis([-1,5,-1,5]) and plot the line](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3aa82bc637_93066f3aa827d09b.jpg)
5 4 3 2 translated square reflected square line y-X -1 -1 2 3 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
