%% Generate PDCCH Symbols
% Generate complex modulated symbols for the PDCCH. The PDCCH symbols are QPSK modulated. Each QPSK symbol represents two bits.
% Create a cell-wide configuration structure, initialized for RMC R.0. Retrieve the PDCCH information.

enb = lteRMCDL('R.0');
pdcchInfo = ltePDCCHInfo(enb)

% The field pdcch.MTot indicates the maximum number of input bits that can be transmitted on the PDCCH.
%
% Generate a codeword that is MTot bits long. Using the codeword, generate PDCCH symbols.

cw = randi([0,1],pdcchInfo.MTot,1);
[pdcchSym,info] = ltePDCCH(enb,cw);
numCodewordBits = length(cw)
numPDCCHSymbols = length(pdcchSym)

% Since there are two bits per symbol, the number of output PDCCH symbols is half length of the codeword bit stream.
% Copyright 2012 The MathWorks, Inc.