%% Encode HARQ-ACK Feedback for PUCCH Format 3
% Encode and decode HARQ-ACK feedback for PUCCH format 3.
% Create a Tx ACK vector. Encode the vector using PUCCH format 3. Turn logical bits into 'LLR' data.

txAck = [1;0;0;1];
cw = lteUCI3Encode(txAck);
cw(cw == 0) = -1;

%
% Decode the received data using the PUCCH format 3 UCI decoder. Verify that the Rx ACK vector matches the Tx ACK vector.

rxAck = lteUCI3Decode(cw,length(txAck))

% Copyright 2012 The MathWorks, Inc.