필터 지우기
필터 지우기

undefined function or variable bits---UMFC vs ODFM

조회 수: 3 (최근 30일)
kenny Ade
kenny Ade 2020년 5월 4일
댓글: kenny Ade 2020년 5월 7일
hi Peng Li,
ERROR IN UMFC ?((LINE 37)
InpData(:symIdx) = randi({0 1}, 10*bits, 1);
Code not running!!!
please assist
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 5월 4일
that code line does not exist in the link you posted.
Walter Roberson
Walter Roberson 2020년 5월 7일
The first parameter to randi should be a numeric scalar, or else a numeric vector with two elements. So randi({0 1}, 10*bits, 1) is wrong because you are passing in a cell instead of a numeric vector, but randi([0 1], 10*bits, 1) might work to assign to inpData(:,symIdx)

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

채택된 답변

Samatha Aleti
Samatha Aleti 2020년 5월 7일
Hi,
I do not see the line of code you mentioned in the above link, but I assume you are pointing to the following line of code:
inpData(:,bandIdx) = bitsIn; % log bits for comparison
Here “bitsIn” is defined as a vector of bits (randomly generated) whose size depends upon number of bites per carrier “bitsPerSubCarrier” and “subbandSize, as follows:
subbandSize = 20; % must be > 1
bitsPerSubCarrier = 4; % 2: 4QAM, 4: 16QAM, 6: 64QAM, 8: 256QAM
bitsIn = randi([0 1], bitsPerSubCarrier*subbandSize, 1);
  댓글 수: 1
kenny Ade
kenny Ade 2020년 5월 7일
Thanks Samatha Aleti. You are the best! Works fine!

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by