Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 4 In preperation for this exercise you will need to change all the colours of the vectors already being plotted by the M-file 'mod
Exercise 4 In preperation for this exercise you will need to change all the colours of the vectors already being plotted by the M-file 'mod ex2.m' to black. To do this change the colour values in your quiver commands to 'k'. Run the file to check everything is now black Now let's visualise the effect of the transformation T, from the previous exercise, on other vectors (non-eigenvectors). Consider the two vectors x and y, which lie along the x-axis and y-axis, respectively, X= [9], x= [] Add the following lines of code to your M-file 'mod6ex2.m', replacing % YOUR CODE HERE % as appropriate. x1 and y1 are your x and y vectors transformed by T. x = % YOUR CODE HERE % % YOUR CODE HERE % quiver(0,0,x(1),x(2), 'Color', 'b'); quiver(0,0,y(1),y(2), 'Color', 'r'); x1 % YOUR CODE HERE % y1 % YOUR CODE HERE % quiver(0,0,x1(1),x1(2), 'Color', 'c'); quiver(0,0,y1(1),y1(2), 'Color', 'm'); axis equal = What do you notice about the effect of the transformation T on vectors lying along the axes? Now see what happens if you apply the transformation T to the vectors twice. Hint: x1 = T*T*x; or x1 = T^2*x; (and the same for y1). What happens if you apply the transformation 6 times? The eigenvector with the largest eigenvalue is called the dominant eigenvector of the matrix. Can you explain why? The following question is an optional bonus question: The eigenvalues of T are both positive, however, in Exercise 1 the matrix A was shown to have eigenvalues of opposite sign. Repeat the above steps using the matrix A as your transformation matrix, 11 3 4 4 2 What happened in this case? Exercise 4 In preperation for this exercise you will need to change all the colours of the vectors already being plotted by the M-file 'mod ex2.m' to black. To do this change the colour values in your quiver commands to 'k'. Run the file to check everything is now black Now let's visualise the effect of the transformation T, from the previous exercise, on other vectors (non-eigenvectors). Consider the two vectors x and y, which lie along the x-axis and y-axis, respectively, X= [9], x= [] Add the following lines of code to your M-file 'mod6ex2.m', replacing % YOUR CODE HERE % as appropriate. x1 and y1 are your x and y vectors transformed by T. x = % YOUR CODE HERE % % YOUR CODE HERE % quiver(0,0,x(1),x(2), 'Color', 'b'); quiver(0,0,y(1),y(2), 'Color', 'r'); x1 % YOUR CODE HERE % y1 % YOUR CODE HERE % quiver(0,0,x1(1),x1(2), 'Color', 'c'); quiver(0,0,y1(1),y1(2), 'Color', 'm'); axis equal = What do you notice about the effect of the transformation T on vectors lying along the axes? Now see what happens if you apply the transformation T to the vectors twice. Hint: x1 = T*T*x; or x1 = T^2*x; (and the same for y1). What happens if you apply the transformation 6 times? The eigenvector with the largest eigenvalue is called the dominant eigenvector of the matrix. Can you explain why? The following question is an optional bonus question: The eigenvalues of T are both positive, however, in Exercise 1 the matrix A was shown to have eigenvalues of opposite sign. Repeat the above steps using the matrix A as your transformation matrix, 11 3 4 4 2 What happened in this case
Step 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