please describe this loop

1 次查看(过去 30 天)
sasmita mohapatra
for i=1 : length(SNR_V) SNR=SNR_V(i); for k=1 : nIteration % generating random channel coefficients h(1:L,1)=random('Normal',0,1,L,1) + ... j * random('Normal',0,1,L,1); h=h./sum(abs(h)); % normalization
% Tr Data TrDataBit=randint(N,1,M); TrDataMod=qammod(TrDataBit,M); TrDataMod(Ip)=Ep * TrDataMod(Ip); TrDataIfft=ifft(TrDataMod,N); TrDataIfftGi=[TrDataIfft(N- GI + 1 : N);TrDataIfft];
% tx Data TxDataIfftGi=filter(h,1,TrDataIfftGi); % channel effect % adding awgn noise TxDataIfftGiNoise=awgn(TxDataIfftGi, SNR - db(std(TxDataIfftGi))); % normalization to signal power db
TxDataIfft=TxDataIfftGiNoise(GI+1:N+GI); TxDataMod=fft(TxDataIfft,N);
% Channel estimation Spilot=TrDataMod(Ip); % trnasmitted pilots Ypilot=TxDataMod(Ip); % received pilots
G=(Ep * length(Ip))^-1* ctranspose(sqrt(Ep)*diag(Spilot)*ctranspose(F(1:L, Ip)));%ctranspose(F(1:L, Ip))=(F(1:L, Ip))'
hHat=G*Ypilot; % estimated channel coefficient in time domain
TxDataBit=qamdemod(TxDataMod./(fft(hHat,N)),M);
% bit error rate computation [nErr bErr(i,k)]=symerr(TxDataBit(Is),TrDataBit(Is)); end end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Propagation and Channel Models 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by