rx_dechunk.asv
上传用户:m_sun_001
上传日期:2014-07-30
资源大小:1115k
文件大小:1k
源码类别:

matlab例程

开发平台:

Matlab

  1. % rx_dechunk
  2. % take out zeros_between from recv_spaced_chunks --> recv_padded_chunks
  3. recv_padded_chunks = zeros(num_chunks, num_carriers+num_zeros);
  4. i = 1;
  5. for k = zeros_between +1:zeros_between +1:fft_size/2
  6. recv_padded_chunks(1:num_chunks,i) = recv_spaced_chunks(1:num_chunks,k);
  7. i = i+1;
  8. end
  9. % take out num_zeros from padded chunks --> recv_chunks
  10. recv_chunks = zeros(num_chunks, num_carriers);
  11. recv_chunks = recv_padded_chunks(1:num_chunks, num_zeros+1:num_carriers+num_zeros);
  12. % Recover bit stream by placing reconstructed frequency domain data in series
  13. recv_dechunked = zeros(1, num_chunks*num_carriers);
  14. for i = 1:num_chunks
  15. for k = 1:num_carriers
  16. recv_dechunked(k + (i-1)*num_carriers*2) = real(recv_chunks(i,k));
  17. recv_dechunked(k + (i-1)*num_carriers*2 + num_carriers) = imag(recv_chunks(i,k));
  18. end
  19. end
  20. % take out trailing zeros from output --> output
  21. output_analog = recv_dechunked(1:data_length);
  22. output = sign(output_analog);