필터 지우기
필터 지우기

I have a matrix of 4095 by 4. i need to divide it into submatrices of 117 by 1.

조회 수: 1 (최근 30일)
How can I do this using for loop? I mean I have to select first 117 rows and 1st column then first 117 rows and 2nd column, then first 117 rows and 3rd column and then 1st 117 rows and 4th column. after that repeat this for next 117 rows and so on uptill 4095 rows.

채택된 답변

Walter Roberson
Walter Roberson 2018년 11월 9일
Baserow = (column-1) * 117;
Subset = YourImage(Baserow+(1:117),column, :) ;
  댓글 수: 6
Sajid Sarwar
Sajid Sarwar 2018년 11월 19일
편집: Walter Roberson 2018년 11월 19일
txSig(n, n1, :) = ofdmMod(Subset);
by this line I'm getting txSig in 3 dimensions whereas I need 2D data for further use in y = awgn(txSig, SNR(k));
and sigRx = ofdmDemod(y);
Walter Roberson
Walter Roberson 2018년 11월 19일
You do not need 2D data for awgn. You might need a row vector for ofdmDemod though.
st=rand(9945,4)
for n=1:85
Baserow = (n-1) * 117;
for n1 = 1:4
Subset = st(Baserow+(1:117),n1, :)
txSig(n, n1, :) = ofdmMod(Subset);
y = awgn(txSig(n, n1, :), SNR(k));
sigRx(n, n1, :) = ofdmDemod(y(:).');
end
end

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Propagation and Channel Models에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by