make_plots.m
上传用户:kendun0711
上传日期:2007-06-03
资源大小:32k
文件大小:2k
- % remake figure 9.14
- figure(1); title('figure 9.14'); hold on
- load run1;plot(mean(Wx'));hold on;plot(Wx(:,69))
- load run2;plot(mean(Wx'));plot(Wx(:,69))
- line([1 500], [0 0])
- ylabel('Tap weight')
- xlabel('Number of iterations')
- text(300,0.6,'a = - 0.99')
- text(300,-0.5,'a = + 0.99')
- set(gca,'ylim',[-1.5 1.5]);hold off
- print -dpsc 9_14
- % remake figure 9.15
- figure(2); title('figure 9.15');hold on
- load run2
- semilogy(mean((E').^2));
- plot(E(:,69).^2)
- set(gca,'ylim',[1e-3 1e0])
- ylabel('Squared error'); xlabel('Number of iterations');hold off
- print -dpsc 9_15
- % remake figure 9.16
- figure(3); title('figure 9.16'); hold on
- load run3;semilogy(mean((E').^2),'r-.');
- load run2;semilogy(mean((E').^2),'b-');
- load run4;semilogy(mean((E').^2),'g--');
- ylabel('Mean-squared error')
- xlabel('Number of iterations')
- legend('mu=0.01','mu=0.05','mu=0.1')
- hold off
- print -dpsc 9_16
- % remake figure 9.17
- load run1
- mu=rp.mu; n=1:500;
- a=-0.99; lambda=abs(a); Ew1=-a+a*(1-mu*lambda).^n;
- a=0.99; lambda=abs(a); Ew2=-a+a*(1-mu*lambda).^n;
- figure(4); title('figure 9.17');
- plot(Ew1); hold on; plot(Ew2)
- load run1;plot(mean(Wx'))
- load run2;plot(mean(Wx'))
- line([1 500], [0 0]);
- text(250,0.6,'a = - 0.99'); text(250,-0.5,'a = + 0.99')
- hold off
- print -dpsc 9_17
- % remake figure 9.18
- figure(5); title('figure 9.18');hold on
- load run4
- mu = rp.mu; a = rp.a; sigu2 = 0.995; sigv2 = (1-(a^2)) * sigu2; n = 1:500;
- a2=a^2; p5mu=0.5*mu;
- j = sigu2*(1-a2)*(1+p5mu*sigu2) + sigu2*(a2+p5mu*a2*sigu2-0.5*mu*sigu2)*(1-mu*sigu2).^(2*n);
- semilogy(j);semilogy(mean((E').^2));
- hold off
- print -dpsc 9_18