Problem 19.16 presents the basics for a method to compute the eigenvalues of a positive definite matrix.
Implement a function choleig that takes a positive definite matrix and executes maxiter iterations. After each iteration, use the MATLAB function spy to show the location of the nonzero entries as follows:
This will allow you to “watch” convergence to a diagonal matrix of eigenvalues. The function should verify thatis positive definite.
Test choleig with the matrix
Create a positive definite matrix using the code provided, and then run choleig with maxiter and watch convergence. Depending on the matrix, it may or may not graphically show as a diagonal matrix. In any case, check the results against eig (A).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here