资 源 简 介
资源描述%%% Chenjie Shi
%%% Date: 09/01/2016
clear;
Nt=16;
Nr=1;
p=-10:30;
for loop=1:length(p)
p_value=10.^(p(loop)/10);
sigma=sqrt(1/p_value);
N=10000;
error=0;
for i=1:N
gen_u=(2*(round(rand(Nr,1)))-1) + j*(2*(round(rand(Nr,1)))-1); %
u=sqrt(1/2)*gen_u;
H=sqrt(1/2)*(randn(Nr,Nt)+j*randn(Nr,Nt));
gamma=u"*(inv(H*H"))*u;
n=sigma*sqrt(1/2)*(randn(Nr,1)+j*randn(Nr,1));
r_zf=1/sqrt(gamma)*u+n;
y_re = real(r_zf); % real
y_im = imag(r_zf); % imaginary
ipHat(find(y_re < 0 & y_im < 0)) = -1 + -1*j;
ipHat(find(y_re >= 0 & y_im > 0)) = 1 + 1*j;
ipHat(find(y_re < 0 &am