필터 지우기
필터 지우기

How to combine 340 sub matrices of 117 by 1 into one matrix of 9945 by 1. I'm working on ofdm(subcarriers=128, cp length=32) and got 117 data carriers. That's why ofdm requires input matrix of 117 by 1

조회 수: 15 (최근 30일)
kindly tell me how to combine these subsets in one matrix. for example I'm working on following lines.
st=rand(9945,4)
for n=1:85
Baserow = (n-1) * 117;
for n1 = 1:4
Subset = st(Baserow+(1:117),n1, :)
txSig = ofdmMod(Subset);
>> y = awgn(txSig, SNR(k));
>> sigRx = ofdmDemod(y);
end
end
I'm getting 340 sub matrices of "Sigtx" of 117 by 1. How to combine them in a single matrix?
thanku.
  댓글 수: 4
Sajid Sarwar
Sajid Sarwar 2018년 11월 18일
M = 4; % Modulation alphabet
k = log2(M); % Bits/symbol
numSC = 128; % Number of OFDM subcarriers
cpLen = 32; % OFDM cyclic prefix length
ofdmMod = comm.OFDMModulator('FFTLength',numSC,'CyclicPrefixLength',cpLen);
ofdmDemod = comm.OFDMDemodulator('FFTLength',numSC,'CyclicPrefixLength',cpLen);
channel = comm.AWGNChannel('NoiseMethod','Variance', ...
'VarianceSource','Input port');
ofdmDims = info(ofdmMod)
numDC = ofdmDims.DataInputSize(1)
Stephen23
Stephen23 2018년 11월 19일
@Sajid Sarwar: please do NOT post the same question multiple times. It does not make it faster or easier for you to get help on this forum.

댓글을 달려면 로그인하십시오.

답변 (1개)

Stephen23
Stephen23 2018년 11월 18일
편집: Stephen23 2018년 11월 18일
Add these three lines to your code:
C = cell(4,85);
...
for ii = 1:85
...
for jj = 1:4
sigRx = ...
C{jj,ii} = sigRx;
end
end
V = vertcat(C{:})
  댓글 수: 11
Sajid Sarwar
Sajid Sarwar 2018년 11월 19일
Stephen Cobeldick sir, "combine 340 sub matrices of 117 by 1 into one matrix of 9945 by 4" as follows:
st=rand(9945,4)
for n=1:85
Baserow = (n-1) * 117;
for n1 = 1:4
Subset = st(Baserow+(1:117),n1, :)
txSig = ofdmMod(Subset);
>> y = awgn(txSig, SNR(k));
>> sigRx = ofdmDemod(y);
end
end
then output of sigRx(340 matrices of 117 by 1=9945 by 4
(a_1,1 a_1,2 a_1,3 a_1,4
uptill uptill uptill uptill
a_117,1 a_117,2 a_117,3 a_117,4
uptill uptill uptill uptill
a_9945,1 a_9945,2 a_9945,3 a_9945,4)
i have tried to write a matrix of 9945 by 4, which I required
Stephen23
Stephen23 2018년 11월 19일
편집: Stephen23 2018년 11월 19일
@Sajid Sarwar: why are you just repeating your comments? So far you have totally ignored anything that I have written: your code does not show any attempt to use what I have shown you in my answer or my comments, so I am not quite sure how I can help you, if you just totally ignore what I write.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Modulation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by