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.
5 4 3 2 translated square reflected square line y-X -1 -1 2 3 4Step 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