QuestionQuestion

Check the file: Questions.pdf

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

Problem 1.
We apply the QR algorithm to determine the eigenvalues of the matrix A via the algorithm explained in the problem. This produces a sequence of matrices, and we check if the diagonal elements converge by comparing each with the diagonal elements of the previous matrix.
If the absolute value of the difference in diagonal elements is small enough (given by a user prescribed tolerance) we say that the algorithm has converged.

Sample runs:
D=diagonal(1,2,3,4,5)
A=S D S^{-1}, with S a random matrix as produced by rand
Tol= 1.e-7
75 iterations till convergence
D=diagonal(1,2,3,4,5,6,7,8,9,10)
A=S D S^{-1}, with S a random matrix as produced by rand
Tol= 1.e-7
140 iterations till convergence.
Matlab code:
function [ev,iter]=qr_diagonalize(A,tol)
%INPUT:
%   A: n by n matrix
%   tol: tolerance for convergence
%OUTPUT:
%   eigenvalues - of equation A obtain by QR

n=size(A,1);
if size(A,2) ~= n
    error('A must be square')
end

if nargin < 2
    tol=eps;
end
done=0;
iter=0;
while ~done
    iter=iter+1;
    [Q,R]=qr(A);...
$27.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Linear Algebra Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats