www.pudn.com > SpacetimeMatlabCode.rar > est.m, change:2004-03-21,size:1097b
function [est_coefs,signal]=est(signal,ch_coefs,frames,sim_options)
%**************************************************************************
%This file carriers out channel estimation based on MMSE technique. It
%outputs the signal stripped of its preamble and the channel estimates.
%**************************************************************************
pilots=[0 0 0 0 0 0 0 0 0 0 1 -1 -1 1 -1 -1 1 -1 1 1;1 -1 -1 -1 1 -1 -1 1 -1 1 0 0 0 0 0 0 0 0 0 0];
pilots=pilots.';
tr_symbols=signal(1:20,:,:);
signal=signal(21:end,:,:);
for k=1:frames
if sim_options.RxDiv==2
h11=mean(tr_symbols(11:20,1,k).*conj(pilots(11:20,1)));
h12=mean(tr_symbols(1:10,1,k).*conj(pilots(1:10,2)));
h21=mean(tr_symbols(11:20,2,k).*conj(pilots(11:20,1)));
h22=mean(tr_symbols(1:10,2,k).*conj(pilots(1:10,2)));
est_coefs(:,:,k)=[[h11;h12] [h21; h22]];
else
h11=mean(tr_symbols(11:20,1,k).*conj(pilots(11:20,1)));
h21=mean(tr_symbols(1:10,1,k).*conj(pilots(1:10,2)));
est_coefs(:,:,k)=[h11;h21];
end
end