rx_dechunk.m
上传用户:m_sun_001
上传日期:2014-07-30
资源大小:1115k
文件大小:1k
- % rx_dechunk
- % take out zeros_between from recv_spaced_chunks --> recv_padded_chunks
- recv_padded_chunks = zeros(num_chunks, num_carriers+num_zeros);
- i = 1;
- for k = zeros_between +1:zeros_between +1:fft_size/2
- recv_padded_chunks(1:num_chunks,i) = recv_spaced_chunks(1:num_chunks,k);
- i = i+1;
- end
- % take out num_zeros from padded chunks --> recv_chunks
- recv_chunks = zeros(num_chunks, num_carriers);
- recv_chunks = recv_padded_chunks(1:num_chunks, num_zeros+1:num_carriers+num_zeros);
- % Recover bit stream by placing reconstructed frequency domain data in series
- recv_dechunked = zeros(1, num_chunks*num_carriers);
- for i = 1:num_chunks
- for k = 1:num_carriers
- recv_dechunked(k + (i-1)*num_carriers*2) = real(recv_chunks(i,k));
- recv_dechunked(k + (i-1)*num_carriers*2 + num_carriers) = imag(recv_chunks(i,k));
- end
- end
- % take out trailing zeros from output --> output
- output_analog = recv_dechunked(1:data_length);
- output = sign(output_analog);