%% PUSCH Interleave
% Interleave two PUSCH RBs worth of bits for QPSK modulation. Considering the REs reserved for PUSCH DM-RS, there are 144 REs available for PUSCH data per RB. Therefore, two RBs contain 288 PUSCH symbols. This results in 2*288 bits to QPSK modulate after interleaving.
% Initialize UE specific and UL-SCH related parameter structures. Generate data for QPSK modulation of PUSCH symbols in two RBs. For QPSK, there are two bits per symbol. Perform interleaving and symbol modulation.

ue.CyclicPrefixUL = 'Normal';
ue.Shortened = 0;

%

chs.Modulation = 'QPSK';
chs.NLayers = 1;

%

numRB = 2;
numREperRB = 144;
bitsPerSymbol = 2;
numBits = numRB * numREperRB * bitsPerSymbol;
cdata = randi([0 1], numBits, 1);

%

interleaved = lteULSCHInterleave(ue, chs, cdata);
symbols = lteSymbolModulate(interleaved, 'QPSK');

% Copyright 2012 The MathWorks, Inc.