%% Scramble UCI3 Codeword
% Scramble a UCI3 codeword with a PUCCH3 pseudorandom scrambling sequence.
% Create a ue-specific configuration structure. Generate a UCI3 codeword. The UCI3 codeword is 48 bits long.

ue.NCellID = 1;
ue.NSubframe = 0;
ue.RNTI = 1;

txAck = [1;0;0;1];
cw = lteUCI3Encode(txAck);
cwLength = length(cw)

%
% Generate a PUCCH3 pseudorandom scrambling sequence the same length as the codeword. Scramble codeword with PDCCH PRBS.

seq = ltePUCCH3PRBS(ue,length(cw));
scrambled = xor(seq,cw);

% Copyright 2012 The MathWorks, Inc.