Question: one of them case is wrong code is - - - - - % Your Name S = [ 0 , 1 , 1 ,

one of them case is wrong
code is -----
% Your Name
S=[0,1,1,0,0;0,0,1,1,0;1,1,1,1,1]; % square in homogeneous coordinates
M=[1,0,3;0,1,-2;0,0,1]; % translation matrix
MS=M*S; % translated square
% plot the translated square in black with linewidth 2
plot(MS(1,:),MS(2,:),'k','LineWidth',2);
hold on
% enter the reflection matrix
R =[cos(2*pi/4),sin(2*pi/4),0;sin(2*pi/4),-cos(2*pi/4),0;0,0,1];
% apply the reflection matrix to MS
RMS = R*MS;
% plot the reflected square RMS in red with linewidth 2
plot(RMS(1,:),RMS(2,:),'r','LineWidth',2);
% plot the line y = x using the given command
plot([-3,5],[-3,5]);
% add a legend like in the reference figure
legend('translated square','reflected square','line y = x','location','southwest');
axis([-3,5,-3,5]); % rescale the axis
axis square; % adjust aspect ratio of figure
grid on; %creates grid
pls do correct i will upvote otherwise downvote
one of them case is wrong code is - - - - - %

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!