%% Generate PUCCH Format 0 Modulation Symbols for HARQ-ACK Transmission
% Specify two-bit HARQ-ACK transmission and a negative SR.

ack = [1;1];
sr = 0;

% Specify the first symbol index in the PUCCH transmission slot as 10, the number of allocated PUCCH symbols as 2, and the slot number as 3.

symAllocation = [10 2];
nslot = 3;

% Set the scrambling identity to 12 and the initial cyclic shift to 5.

nid = 12;
initialCS = 5;

% Generate the symbols with extended cyclic prefix, intra-slot frequency hopping disabled, and group hopping enabled.

nid = 12;
initialCS = 5;
cp = 'extended';
freqHopping = 'disabled';
groupHopping = 'enable';
sym = nrPUCCH0(ack,sr,symAllocation,cp,nslot,nid,groupHopping,initialCS,freqHopping)

% Copyright 2018 The MathWorks, Inc.