Example of Fig 4.13 - 4.14
Signal and Noise
function [F,a]=example41314 % % Eof of signal and noise % % Generate signal data clf; n=34; m=20; u=linspace(0,2*pi,m); v=linspace(0,2*pi,n); [x,y]=meshgrid(u); for j = 1:n a(:,:,j) = 10*sin(x - 2*v(j)) + 10*randn(length(u)); surf(x,y,a(:,:,j)) ; colormap(gray);brighten(0.5); if j == 10 print('-dpdf','-painters','-adobecset',['example13a.pdf']); end % F(j) = getframe; end %movie(F); for j = 1:n z(:,j) = reshape(a(:,:,j),[m*m 1]); end size(z) [eof,s,v] = svd(z,0); size(eof), size(v) plot(1:34,v(:,1),1:34,v(:,2)) return lam=s.^2/sum(s.^2); for j = 1:9 subplot(3,3,j) contourf(reshape(eof(:,j),[ 20 20]));colormap(gray); brighten(0.5); title([' Eof ' num2str(j) ' ' num2str(lam(j)) '%'],'fontname','times') end orient tall; print('-dpdf','-painters','-adobecset',['example13b.pdf']); return
ans = 400 34 ans = 400 34 ans = 34 34
