undefined function or variable bits---UMFC vs ODFM

3 views (last 30 days)
肯尼·阿德
肯尼·阿德 on 4 May 2020
Commented: 肯尼·阿德2020年5月7日
彭李,嗨,
ERROR IN UMFC ?((LINE 37)
InpData(:symIdx) = randi({0 1}, 10*bits, 1);
Code not running!!!
please assist
2 Comments
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)

Sign in to comment.

Accepted Answer

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 “ 比尔特 ” is defined as a vector of bits ( randomly generated) whose size depends upon number of bites per carrier “ bitsPerSubCarrier “ 和 ” subbandSize , as follows:
subbandSize = 20;% must be > 1
bitsPerSubCarrier = 4;% 2: 4QAM, 4: 16QAM, 6: 64QAM, 8: 256QAM
bitsIn =兰迪([0,1],bitsPerSubCarrier * subbandSize, 1);
1 Comment
肯尼·阿德
肯尼·阿德 2020年5月7日
Thanks Samatha Aleti. You are the best! Works fine!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

开始狩猎!