opt_dfe.m
来自「基于Matlab」· M 代码 · 共 68 行
M
68 行
% opt_dfe Computes MMSE of T/2-spaced feedforward equalizers (FSE)
% and T-spaced decision feedback equalizers (DFE)
% for a T/2-spaced complex FIR channel at a certain
% SNR (dB) of AWGN and a unit power iid source given
% cursor delays for various choices of FSE/DFE length
% adding up to a total length Nfd
%
% [mmse] = opt_dfe(c,snrdb,Nfd,delay,pdelay,spacing,fig_menu,h_msg)
%
% returns:
% mmse : Biased Minimum Mean Square Error
% for every design attempted
% given:
% c : channel
% snrdb : SNR in dB
% Nfd : FSE+DFE length
% Nf : FSE length
% Nd : DFE length
% delay : range of cursor delay
% -1 for match channel cursor
% pdelay : processing delay
% spacing: 1 for BSE
% 1/2 for FSE
% fig_menu: figure handle to update message
% h_msg: message box
function [MSE] = opt_dfe(c,snrdb,Nfd,Nf,Nd,delay,pdelay,spacing,fig_menu,h_msg)
if (isempty(Nfd))
MSE=zeros(length(delay),1);
i=1;
for DELAY=delay,
[h,f,dd,delta,m]=mmse_dfe(c,snrdb,Nf,Nd,DELAY,pdelay,0,spacing);
MSE(i)=m;
pdone=['SNR ', num2str(snrdb), '(dB): ',...
num2str(round(100*i/length(delay))) '% done'];
set(fig_menu,'HandleVisibility','on'); drawnow;
set(h_msg,'BackgroundColor', [0 1 0]);
set(h_msg,'FontAngle','normal', 'String',pdone); drawnow;
i=i+1;
end;
else
MSE=zeros(length(delay),Nfd);
i=1;
for DELAY=delay,
j=1;
for Nf=1:Nfd,
Nd=Nfd-Nf;
[h,f,dd,delta,m]=mmse_dfe(c,snrdb,Nf,Nd,DELAY,pdelay,0,spacing);
MSE(i,j)=m;
j=j+1;
end;
pdone=['SNR ', num2str(snrdb), '(dB): ',...
num2str(round(100*i/length(delay))) '% done'];
set(fig_menu,'HandleVisibility','on'); drawnow;
set(h_msg,'BackgroundColor', [0 1 0]);
set(h_msg,'FontAngle','normal', 'String',pdone); drawnow;
i=i+1;
end;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?