% Datta, page 594, Ex 22 % verification of a bound of the smallest singular value % of a bidiagonal matrix % Module 2, Lecture 2, Demo no. 1, SVD disp(' ---------- Singular Vale Decomosition: Demo no 2: --------------') disp(' ---------- Theoretical estimates for singular values -----------') disp(' ') disp('Maya has to show a slide first... ') wait disp('Beta = [5 100 10000 1e+6];') disp('Eta = [0.5 1e-2 1e-4 1e-6];') disp(' ') disp(' ') wait Beta=[5 100 10000 1e+6]; Eta =[0.5 1e-2 1e-4 1e-6]; for k=1:length(Beta), beta=Beta(k); eta =Eta(k); n=20; A=bidiagonal_estim(beta,eta,n); [U,S,V] = svd(A); dS=diag(S); % if k==1, % figure(1),clf,plot(dS) % title('figure(1),clf,plot(dS)') % waitt('Not seen well.') % end figure(2),clf,semilogy(dS) title('figure(2),clf,semilogy(dS)') waitt('bla') sigma_min = min(dS); estimate=beta^(1-n)*(1-(2*n-1)*eta); disp(['Parameters: beta=' num2str(beta) ', eta=' num2str(eta)]) disp(['Computed value ' num2str(sigma_min)]) disp(['Estimated value ' num2str(estimate)]) wait end disp('We can see one portrait of the matrix: ') wait figure(3),clf,mesh(A) disp(' ... end demo.') %