plot_16_12.m
上传用户:kendun0711
上传日期:2007-06-03
资源大小:32k
文件大小:1k
- %Contours for BPSK, no noise, in equializer space
- clear
- h0=1;h1=-0.5;h2=0.2;h3=0.3;
- H=[h1 h3;h0 h2];
- ks=1; sig_s=1; sig_w=0;kw=0;
- r=0.04;
- %cost function
- p=0;q=0;
- for w0=-4:r:4
- p=p+1;
- q=0;
- for w1= -4:r:4
- q=q+1;
- w=[w0 w1]';
- J(p,q)=0.25*sig_s^4*(ks-3)*norm(H'*w,4)^4+0.75*sig_s^4*norm(H'*w,2)^4+...
- 0.25*sig_w^4*(kw-3)*norm(w,4)^4+0.75*sig_w^4*norm(w,2)^4+...
- 1.5*sig_s^2*sig_w^2*norm(H'*w,2)^2*norm(w,2)^2-...
- 0.5*sig_s^2*ks*(sig_s^2*norm(H'*w,2)^2 +sig_w^2*norm(w,2)^2)+0.25*sig_s^4*ks^2;
- if J(p,q)>0.25 & w0^2+w1^2 >1.5
- J(p,q)=nan;
- elseif J(p,q)>0.19 & w0^2+w1^2 >1
- J(p,q)=0.19;
- end
- end
- end
- meshc(-4:r:4, -4:r:4, ((J')/max(max(J))))
- axis([-3.5 3.5 -4 4 0 1])
- xlabel('w_0')
- ylabel('w_1')
- zlabel('J')
- title('figure 16.12')
- print -dps 16_12