%%%%%%%%%%%%%%%%%%%%%%%%%
% experiment3 (p.66-67) %
%%%%%%%%%%%%%%%%%%%%%%%%%

format short e
A = [0.7000 0.70711;0.70001 0.70711]

[Q,R] = qr(A)
checkQ1 = norm(Q'*Q-eye(2))

[Qm,Rm] = modifiedgs(A)
checkQ2 = norm(Qm'*Qm-eye(2))

[Qc,Rc] = classicgs(A)
checkQ3 = norm(Qc'*Qc-eye(2))

%dot(Q(:,1),Q(:,2))
%dot(Qm(:,1),Qm(:,2))
%dot(Qc(:,1),Qc(:,2))


