Unformatted text preview: CME302 Homework 6 (1) Problem 28.2 (a) (b) (c) (2) This problem is based on Problem 29.1 from Trefethen. We would like you to put together a MATLAB program that finds all the eigenvalues of a real symmetric matrix, using only elementary building blocks. Use A = hilb (4) to test first four parts of the problem and show the test results on your homework. (a) Write a function T = tridiag ( A ) that reduces a real symmetric m × m matrix to tridiagonal form by orthogonal similarity transformations. Your program should use elementary MATLAB operations only. Add a line that forces T at the end to be exactly symmetric and tridiagonal. (b) Write a function Tnew = qralg ( A ) that runs the unshifted QR algo rithm on a real tridiagonal matrix T . For the QR factorization at each step, use the programs from Exercise 10.2, or, a new code based on Givens rotations or 2 × 2 Householder reflections rather than m × m operations. Again, enforce symmetry and tridiagonality at each step. Your program should stop and returnsymmetry and tridiagonality at each step....
View
Full Document
 Fall '09
 Orthogonal matrix, Eigenvalue algorithm, QR algorithm, Trefethen, real tridiagonal matrix

Click to edit the document details