% Starting diary file diary-29-Nov-2010.txt A = [92 -144 ; -144 8] / 100 x = [1;1] A*x eigshow(A) help eig [X,D] = eig(A) x1 = X(:,1) x2 = X(:,2) A * x1 A*x2 x2 norm(x2) A*x2 y = 17*x2 A*y n = 100 help spdiags e = ones(n,1); A = spdiags([-e 2*e -e], [-1 0 1], n , n); A = full(A); A(1:10,1:10) close all spy(A) [X,D] = eig(A); whos X D x = X(:,17); size(x) lambda = D(17,17) norm(A*x - lambda*x) lambda = diag(D) size(lambda) plot(lambda,'.') min(lambda) max(lambda) x plot(x) for i = 1:100,x=X(:,i);plot(x,'.');title(sprintf('%d',i));pause;end load temperature A = A100; size(A) help eigs [X,D] = eigs(A,20,'SM'); size(A) size(X) size(D) diag(D) for i = 1:20,x=X(:,21-i);surf(reshape(x,100,100));title(sprintf('%d',i));pause;end diary off