% % This script generates a sequence of vectors a % that give increasingly pathological results in % computing the Householder transformation with % the WRONG CHOICE OF SIGN. % % calls HHbad.m % % D.C. Sorensen % 15 Sep 04 % echo on a = randn(6,1) [v,tau] = HHbad(a); Q = eye(6) - tau*v*v'; norm(eye(6) - Q'*Q) pause %------------------------------------------------------------------------ theta = 100*sqrt(eps) a = eye(6,1) + theta*randn(6,1) [v,tau] = HHbad(a); Q = eye(6) - tau*v*v'; norm(eye(6) - Q'*Q) pause %------------------------------------------------------------------------ theta = sqrt(eps) a = eye(6,1) + theta*randn(6,1) [v,tau] = HHbad(a); Q = eye(6) - tau*v*v'; norm(eye(6) - Q'*Q) pause %------------------------------------------------------------------------ theta = sqrt(eps)/100 a = eye(6,1) + theta*randn(6,1) [v,tau] = HHbad(a); Q = eye(6) - tau*v*v'; norm(eye(6) - Q'*Q) pause %------------------------------------------------------------------------ theta = sqrt(eps)/10000 a = eye(6,1) + theta*randn(6,1) [v,tau] = HHbad(a); Q = eye(6) - tau*v*v'; norm(eye(6) - Q'*Q) echo off