%% Encode DCI with Unity RNTI
% Perform DCI processing on an all-zero input with RNTI set to 1. This processing results in a nonzero output when you set RNTI to 1.
% Generate a dcibits input vector with zeros for a DCI format 1 message. enb is defined with 50 downlink RBs, 1 cell-specific reference signal antenna port, and FDD duplex mode.

enb = struct('NDLRB',50,'CellRefP',1,'DuplexMode','FDD');
dciInfo = lteDCIInfo(enb);
dcibits = zeros(dciInfo.Format1,1);

%
% Define a ue parameter structure with PDCCH format 1 and RNTI set to 1.

ue = struct('PDCCHFormat',1,'RNTI',1);

%
% Encode the DCI bits.

cw = lteDCIEncode(ue,dcibits);
cw(1:10)

% For PDCCH format 1, the output vector length is 144. For this example, with RNTI set to 1, the output vector is not all-zeros.
% Copyright 2012 The MathWorks, Inc.