make_plots.m
上传用户:kendun0711
上传日期:2007-06-03
资源大小:32k
文件大小:1k
- % make figure 10.8
- Z2=zeros(4,491);
- load run2
- tail=[0 5 8 66];
- z=sum(real(E).^2,2);
- [y ind]=sort(z);
- newE=E(ind,:);
- for i=1:4,
- Z2(i,:)=sum((real(newE(1:400-tail(i),:)).^2))/(400-tail(i));
- end
- figure(1);semilogy(Z2')
- title('figure 10.8')
- print -dpsc 10_8
- % raw ensemble error curves
- Z1=zeros(4,491);
- n=size(E,1);
- for i=1:4,
- eval(['load run' num2str(i)])
- Z1(i,:)=sum((real(E(1:n,:)).^2))/n;
- end
- figure(2); semilogy(Z1')
- % title('figure 10.8')
- % print -dpsc 10_8
- % make figure 10.9
- Z3=zeros(4,491);
- t=66;
- for i=1:4,
- eval(['load run' num2str(i)]);
- z=sum(real(E).^2,2);
- [y ind]=sort(z);
- newE=E(ind,:);
- Z3(i,:)=sum((real(newE(1:400-t,:)).^2))/(400-t);
- end
- figure(3); semilogy(Z3')
- title('figure 10.9')
- print -dpsc 10_9
- % make figure 10.10a-d
- base=3;
- strb=['a'; 'b'; 'c' ;'d']
- for i=1:4,
- figure(base+i);
- eval(['load run' num2str(i)])
- z=sum(real(E).^2,2);
- [y ind]=sort(z);
- newE=E(ind,:);
- t=66;
- z_dct=sum((real(newE(1:400-t,:)).^2))/(400-t);
- semilogy(z_dct);
- hold on
- eval(['load ../9_7_lms/run' num2str(i)])
- semilogy(mean(E'.^2),'r')
- eval(['load ../13_7_rls_eq/run' num2str(i)])
- semilogy(mean(A.^2),'m')
- hold off
- str=['title(''figure 10.8' strb(i) ''')']
- eval(str)
- eval(['print -dpsc 10_8' strb(i) ])
- end