Commit 7a111483 authored by Сергей Сеткин's avatar Сергей Сеткин
Browse files

Upload New File

parent b2345288
No related merge requests found
Showing with 13 additions and 0 deletions
+13 -0
function out = OFDM_demodulation(input) %верим, что всегда будет корректное кол-во битов на входе
%input=[0.437500000000000 + 0.00000000000000i -0.0902139576283758 - 0.250047759289223i -0.0376829855686813 + 0.0496647478667461i -0.0348657202930875 - 0.0634668323561626i -0.0581371332382730 + 0.00479004632619339i -0.0484122994867551 - 0.0503680015902815i -0.0125357808019807 + 0.0812323743301355i 0.00495164359069682 + 0.0278311407132105i 0.0625000000000000 + 0.0533470869120796i -0.00635487021948107 - 0.0133889901584092i -0.0128607474054549 - 0.0242744423296058i -0.0136515773534572 - 0.00758150994156184i 0.0149282759768639 + 0.0240811890647843i 0.0541744231665325 - 0.0178243086851575i 0.0370960883916625 + 0.00522747327214718i -0.0434198530331169 - 0.0465011707663910i -0.0312500000000000 + 0.00000000000000i -0.0494282135620201 + 0.0162951025965059i 0.0258310911728039 - 0.000561358644000766i 0.0390892426631489 - 0.00475225938705544i -0.00198410215270472 - 0.00716881093521567i -0.0300199520361510 - 0.00335548835887319i -0.0261487176361933 + 0.0563544402770644i -0.0140901196002532 + 0.0118503533918078i 0.0625000000000000 - 0.00915291308792039i 0.0143770722324699 - 0.0297059750379136i 0.00735107201946979 - 0.0332212645356720i -0.0177892243405702 + 0.0299063169502034i -0.0173070405858862 + 0.0360400463261934i 0.0148634553286580 - 0.0109581384519458i 0.0189499798283742 - 0.0262066055218795i -0.0292100494282381 - 0.0566395975793489i 0.00000000000000 + 0.00000000000000i -0.0292100494282381 + 0.0566395975793489i 0.0189499798283742 + 0.0262066055218795i 0.0148634553286580 + 0.0109581384519458i -0.0173070405858862 - 0.0360400463261934i -0.0177892243405702 - 0.0299063169502033i 0.00735107201946979 + 0.0332212645356720i 0.0143770722324699 + 0.0297059750379136i 0.0625000000000000 + 0.00915291308792039i -0.0140901196002532 - 0.0118503533918078i -0.0261487176361933 - 0.0563544402770644i -0.0300199520361510 + 0.00335548835887319i -0.00198410215270472 + 0.00716881093521567i 0.0390892426631489 + 0.00475225938705544i 0.0258310911728039 + 0.000561358644000764i -0.0494282135620201 - 0.0162951025965059i -0.0312500000000000 + 0.00000000000000i -0.0434198530331169 + 0.0465011707663910i 0.0370960883916625 - 0.00522747327214718i 0.0541744231665325 + 0.0178243086851575i 0.0149282759768639 - 0.0240811890647843i -0.0136515773534572 + 0.00758150994156184i -0.0128607474054549 + 0.0242744423296058i -0.00635487021948107 + 0.0133889901584092i 0.0625000000000000 - 0.0533470869120796i 0.00495164359069682 - 0.0278311407132105i -0.0125357808019807 - 0.0812323743301355i -0.0484122994867551 + 0.0503680015902815i -0.0581371332382730 - 0.00479004632619338i -0.0348657202930875 + 0.0634668323561626i -0.0376829855686813 - 0.0496647478667461i -0.0902139576283757 + 0.250047759289223i];
input = fft(input);
out = [];
j = 0;
while (j < length(input))
temp = [];
temp = [input((4 + j):(10 + j)) input((12 + j):(24 + j)) input((26 + j):(31 + j)) input((33 + j):(38 + j)) input((40 + j):(52 + j)) input((54 + j):(60 + j))];
out = [out round(real(temp),1)];
j = j + 64;
end
end
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment