hw3p2sol - ans = 2.94E-015 % We see that both the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 % % Math 5316 Spring 2009 % Homework 3 Problem 2 % Solution A=-.99999*tril(ones(60,60),-1)+eye(60) A(:,60)=ones(60,1) x=randn(60,1) b=A*x [Q R]=qr(A) y=R\(Q'*b) norm(Q*R-A)/norm(A) ans = 3.31E-016 norm(x-y)/norm(x)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ans = 2.94E-015 % We see that both the factorization and the solution are quite accurate % In contrast the LU factorization was unstable and the computed % solution inaccurate....
View Full Document

This note was uploaded on 05/08/2009 for the course MATH 5316 taught by Professor Dr.thomashagstrom during the Spring '09 term at SMU.

Ask a homework question - tutors are online