%% Generate PUSCH Symbols Using Codebook-Based Transmission
% Specify a random sequence of binary values corresponding to a codeword of 8064 bits.

cw = randi([0 1],8064,1);

% Using 256-QAM modulation, generate PUSCH modulation symbols for the specified physical layer cell identity number, RNTI, bandwidth, and one transmission layer. Enable transform precoding and codebook-based transmission based on the specified TPMI and four antennas.

modulation = '256QAM';
ncellid = 17;
rnti = 111;
mrb = 6;
nlayers = 1;
transformPrecode = true;
txScheme = 'codebook';
tpmi = 1;
nports = 4;
sym = nrPUSCH(cw,modulation,nlayers,ncellid,rnti,transformPrecode,mrb,txScheme,nports,tpmi)

% Copyright 2018 The MathWorks, Inc.