4 attachmentsSlide 1 of 4

•  attachment_1attachment_1  •  attachment_2attachment_2  •  attachment_3attachment_3  •  attachment_4attachment_4  ### UNFORMATTED ATTACHMENT PREVIEW

(MATLAB problem) Let A = 1 2 4 2 0 4 1 0 2 0 1 2 a) Use the MATLAB function rank to figure the rank of A. b) MATLAB’s pinv command returns the pseudoinverse of a matrix. Use piny to compute the pseudoinverse At of A. c) Use MATLAB’s svd command to find the singular values of AA and AA, and calculate AA and ATA. Using the results of problem Q1b, and Qlc to explain AA and At A. (MATLAB problemn) Run the sample_inverse_PM.m code provided. The first 3 lines construct a random matrix A with the prescribed eigenvalues given in line 2. The 4th line constructs a matrix B which shifts the eigenvalues of A by the same amount, while leaving the eigenvalues unchanged. 1 The fifth line inverts B and names the inverse C, and the remainder of the code applies the power method to the matrix C, starting from the vector of all ones. Run the code and examine it closely, then answer the following questions. a) What are the cigenvalues of B and C? Your answer should be in terms of the cigenvalues of A. b) Use reasoning, not MATLAB, to answer this question, and show your reasoning. q is a very good approximation for an eigenvector of A. What is the corresponding cigenvalue A? c) How would the answer in b) change if we replaced 0.25 with 1.5 in line 4 of the script? Explain your answer. d) After running the code with 0.25 in line 1, show how good the approximation vector q is by typing in MATLAB norm((A-1*eye (6))*q), where is the number you obtained in b). This computes the 2-norm of the vector in parentheses; if it is small, the vector q is a good approximation. 1 [Q, R]= qr(randn (6)): 2 3 diag([2.75, -1, -3, 0.5, 8, 2]): 4 5 – A = Q*D*Q’: 6 7 – B = A – 0.25*eye (6): 00 9 9 C = inv(B); 10 11 q = ones (6, 1); s = 1; 12 13 – 14 – 15 – 16 – for j-1:18 q_old = 4: q_new = C*q_old: [m, ind] max (abs (q_new)); s. Q_new (ind (1)): a q_new/s: end = 17 18 = 19 20

Do you similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at essayloop.com

Do you have a similar assignment and would want someone to complete it for you? Click on the ORDER NOW option to get instant services at essayloop.com. We assure you of a well written and plagiarism free papers delivered within your specified deadline.