Question
Hi guys, this one needs to be done in MATLAB.thnx in advance. The capital letter N is determined by 8 points(given matrix in last picture, the first line of that matrix are these 8 points).The coordinates of these points can be stored in matrix A. Try to find a 3 * 3 matrix,It corresponds to multiplied by multiplied by 0.5, and then rotates 90 degrees, in the end each point of coordinate are added (-0.5,2) for translation .The program is required to display the following transformations also need to do the same with M letter(both need Matlab code):

하. 5 아 아 μ , … 10 0 5 10 10 10 .5 .5 .5 6 10 5 10
media%2F5ed%2F5edb57bb-53e0-4b46-8f4c-94
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB CODE:

% GIVEN MATRIX A

A = [[0 0.5 0.5 6 6 5.5 5.5 0];[0 0 6.42 0 8 8 1.58 8];[1 1 1 1 1 1 1 1]];

%Now Plot A

subplot(2,2,1);

ax1 = plot(A(1,:),A(2,:));

axis([-5 10 -5 10]);

grid on;

xlabel('(1)');

%Scaling Matrix T1 scales A by 0.5

T1 = [[0.5 0 0];[0 0.5 0];[0 0 0.5];];

%Now Plot transformed A

subplot(2,2,2);

A = T1*A;

plot(A(1,:),A(2,:));

axis([-5 10 -5 10]);

grid on;

xlabel('(2)');

%Rotation Matrix T2 rotates A by 90*

T2 = [[0 -1 0];[1 0 0 ];[0 0 1]];

%Now Plot rotated A

subplot(2,2,3);

A = T2*A;

plot(A(1,:),A(2,:));

axis([-5 10 -5 10]);

grid on;

xlabel('(3)');

%Matrix T3 used to add (-0.5, 2) to each point if A

T3 = [-0.5;2;0];

%Add given coordinates to each coloumn of A

for i = 1:8

    A(:,i) = T3+A(:,i);

end

%Now Plot final A

subplot(2,2,4);

plot(A(1,:),A(2,:));

axis([-5 10 -5 10]);

grid on;

xlabel('(4)');

OUTPUT:

10 10 -5 -5 -5 10 10 10 10 -5 -5 -5 10 -5 10

Add a comment
Know the answer?
Add Answer to:
Hi guys, this one needs to be done in MATLAB.thnx in advance. The capital letter N...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For this project, each part will be in its oun matlab script. You will be uploading a total 3 m f...

    For this project, each part will be in its oun matlab script. You will be uploading a total 3 m files. Be sure to make your variable names descriptive, and add comments regularly to describe what your code is doing and hou your code aligns with the assignment 1 Iterative Methods: Conjugate Gradient In most software applications, row reduction is rarely used to solve a linear system Ar-b instead, an iterative algorithm like the one presented below is used. 1.1...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT