📄 ed_receiver.m
字号:
%% function [rx_down,samples_per_tint] = ed_receiver(rx_uoi,T_INT,FS_CONT,N_INT,MU)%function [rx_down,samples_per_tint] = ed_receiver(rx_uoi,T_INT,FS_CONT,N_INT,MU)%square the shitrx_sq = rx_uoi.^2;%integrate pieces of T nssamples_per_tint = T_INT * FS_CONT;%pad the end with zeros so that we can do the reshaperx_sq = zero_pad_reshape(rx_sq,samples_per_tint * N_INT);%do the integration% $$$ dt = 1/FS_CONT;% $$$ rx_int = dt*sum(reshape(rx_sq, samples_per_tint, length(rx_sq) / ...% $$$ samples_per_tint),1);rx_int = sum(reshape(rx_sq, samples_per_tint, length(rx_sq) / ... samples_per_tint),1);%do the quantizationif MU <= 0 rx_quant = rx_int;else rx_quant = []; idx_0 = find(rx_int<MU); idx_1 = find(rx_int>MU); idx_n = find(rx_int==MU); rx_quant(idx_0) = 0; rx_quant(idx_1) = 1; rx_quant(idx_n) = round(rand(1,length(idx_n)));end%sum N_INT blocksrx_down = sum(reshape(rx_quant, N_INT, length(rx_quant) / N_INT),1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -