%function []=prob_9_3_22() % % Written by: % -- % John L. Weatherwax 2006-12-20 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clc; close all; n = 4; A = gen_der2_mat(n); [Q,T]=lanczos(A); disp('Q^T Q is equal to' ); (Q.') * Q disp( 'A*Q should equal Q T, the norm of the difference between the two matrices is' ); norm( A * Q - Q * T )