?? receiver.m
字號:
function [data_bits, raw_bits, data_bits1] = receiver(rx_signal, sim_options, SNR);
global sim_consts;
% Return to frequency domain
% 返回到頻域
[freq_tr_syms, freq_data_syms, freq_pilot_syms] = rx_timed_to_freqd(rx_signal(193:end), sim_options);
freq_tr_syms=freq_tr_syms/sqrt(64);
freq_data_syms=freq_data_syms/sqrt(64);
freq_pilot_syms=freq_pilot_syms/sqrt(64);
% Demodulate
% 解調
[pr, soft_bits] = rx_demodulate(freq_data_syms, sim_options, SNR);
% hard decision of soft bits, used to measure uncoded BER
% 軟位流的硬判決,用于測量非編碼的誤碼率
raw_bits = soft_bits > 0;
% LDPC decoding
% LDPC譯碼
data_bits = rx_ldpc_decode(pr, sim_options.DecMaxIter);
rx_symbols = freq_data_syms(:).';
noise_var = 1/(10^(SNR/10))/1.8;
pr1=exp(-(real(rx_symbols-1).^2+imag(rx_symbols-1).^2-real(rx_symbols+1).^2-imag(rx_symbols+1).^2)/2/noise_var);
data_bits1 = rx_ldpc_decode(pr1, sim_options.DecMaxIter);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -