📄 dft_estimator.m
字号:
function data_cir = dft_estimate(pilot_freq_cir)
% pilot_freq_cir: cir at the pilot frequency
% channel_cir: cir at all the frequency
global sim_consts;
N1 = sim_consts.NumPilotSubc; % the length of the window should be the same as the number of pilot per ofdm symbol
N2 = 64;
if sim_consts.WindowFunction == 'chebyshev' % 切比雪夫窗函数
A = 40;
w1 = chebwin(N1,A);
w2 = chebwin(N2,A);
elseif sim_consts.window_function == 'kaiser'
beta=5; % 凯塞窗函数
w1=kaiser(N1,beta);
w2=kaiser(N2,beta);
end
for i = 1:size(pilot_freq_cir,2)
window_pilot_freq_cir = pilot_freq_cir(:,i);
window_pilot_time_cir = ifft(window_pilot_freq_cir);
window_subchan_time_cir = [window_pilot_time_cir;zeros(58,1)];
window_subchan_freq_cir = fft(window_subchan_time_cir);
subchan_freq_cir(:,i) = window_subchan_freq_cir;
end
data_cir = subchan_freq_cir(sim_consts.DataSubcIdx,:);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -