function [] = prob_10_9(n) % PROB_10_9 - % % 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. % %----- randn('seed',0); A = 2*ones(n,n) + 5*randn(n,n); tic; sort( svd(A).' ) toc tic; sort( sqrt(eig(A'*A)).' ) toc tic; Z = zeros(size(A)); s = eig([ Z A; A' Z']); s = s(s>0); sort( s.' ) toc