err_cnt - if mod(k,20)==0 h(k) = exp(-k/rms_delay); else...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
clear all load ('data_in.txt'); load ('demap.txt'); l K = 1024; p_index = 1; p_index1= 4; len = length(data_in); error_cnt = 0; N_sym = len/K; N for k=1:len if k < p_index if data_in(k) ~= demap(k) error_cnt = error_cnt +1; end else if k == p_index1 p_index = p_index + 32; p_index1= p_index1+ 32; end end end e demap_error = error_cnt d %The channel profiile will be different rms_delay = 20; for k = 1:128;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if mod(k,20)==0 h(k) = exp(-k/rms_delay); else h(k) = 0; end end e Hcrt = fft(h,1024); H %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% load ('Hf_est.txt'); l len = length(Hf_est); N_sym = len/1024; N v=1:1024; mse = 0; for k = 1:N_sym tmp = Hf_est(v); mse = mse + (real(tmp - Hcrt)).^2+(imag(tmp - Hcrt)).^2; v=v+1024; end MSE = mean(mse/len)...
View Full Document

This note was uploaded on 08/23/2009 for the course IEE 5036 taught by Professor Cwliu during the Fall '05 term at National Chiao Tung University.

Ask a homework question - tutors are online