plot_16_14.m~
上传用户:kendun0711
上传日期:2007-06-03
资源大小:32k
文件大小:1k
- %Contours for BPSK, no noise, in equializer space
% with global MMSE minima marked by *
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.01;kw=0.01;
%cost function
p=0;q=0;r=0.01
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;
end
end
end
[x1,x2]=find(J==min(min(J)));
hold on
contour(-4:r:4, -4:r:4, ((J')/max(max(J))))
for p=1:length(x1)
plot(-4+x1(p)*r,-4+x2(p)*r, '*');
end
axis([-4 4 -3 3])
xlabel('w_0')
ylabel('w_1')
title('figure 16.14')
print -deps 16_14