function [] = prob_10_4(n) % PROB_10_4 - % % % Written by: % -- % John L. Weatherwax 2005-08-28 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- d = ones(n-1,1); A = diag(d,1) + diag(d,-1); e = eig(A); inds = -(n-1)/2:(n-1)/2; plot(inds,e,'.'); grid on; disp( 'Press enter to overlay my eigenvalue guess...' ); pause; lambdaG = 2*sin((pi/(n+1))*inds); hold on; plot(inds,lambdaG,'r.');