⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ip_06_12.m

📁 数字通信第四版原书的例程
💻 M
字号:
% MATLAB script for Illustrative Problem 12, Chapter 6.
echo on
N=500;			        	% length of the information sequence
K=5;
actual_isi=[0.05 -0.063 0.088 -0.126 -0.25 0.9047 0.25 0 0.126 0.038 0.088];
sigma=0.01;
delta=0.115;
Num_of_realizations=1000;
mse_av=zeros(1,N-2*K);
for j=1:Num_of_realizations,   		% compute the average over a number of realizations
  % the information sequence
  for i=1:N,
    if (rand<0.5),
      info(i)=-1;
    else
      info(i)=1;
    end;
  end;
  % the channel output
  y=filter(actual_isi,1,info);
  for i=1:2:N,
    [noise(i) noise(i+1)]=gngauss(sigma);
  end;
  y=y+noise;
  % now the equalization part follows
  estimated_c=[0 0 0 0 0 1 0 0 0 0 0];	% initial estimate of ISI
  for k=1:N-2*K,
    y_k=y(k:k+2*K);
    z_k=estimated_c*y_k.';
    e_k=info(k)-z_k;
    estimated_c=estimated_c+delta*e_k*y_k;
    mse(k)=e_k^2;
  end;
  mse_av=mse_av+mse;
end;
mse_av=mse_av/Num_of_realizations;	% mean squared error versus iterations 
% plotting commands follow

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -