代写 algorithm matlab ECS130 Homework Assignment 4

ECS130 Homework Assignment 4
Due: 4:00pm, February 20, 2019
1. Ex 6.2
2. Ex 6.3
3. Ex 6.4
4. Ex 6.6
5. Ex 6.9
6. Consider the matrix
 2 −1 −1 2 …
 
… A= …… 
 ..  . −1
−1 2 Taking A to be a 10 by 10 matrix, and try the following:
(a) Implement the power method to compute an approximation to the eigenvalue of largest absolute value and its corresponding eigenvector. Comment on the rate of convergence.
(b) Implement the QR algorithm (without shift). Comment on the rate at which the off- diagonal entries in A are reduced.
(c) Implement the shift QR algorithm, and use Ai(n,n) as the shift. Comment on the rate at which the off-diagonal entries in A are reduced.
Notes: (1) Use e1 = (1, 0, …, 0)T as initial vector. (2) You may use MATLAB routine [Q, R]=qr(A) to perform the necessary QR factorization. (c) Turn in a list of your code together with the eigenvalue/eienvector pair that you computed.
1