%% Generate PUCCH Format 1 Modulation Symbols for Two-Bit HARQ-ACK with Positive SR Transmission
% Specify a transmission with two-bit HARQ-ACK and positive SR.

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

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

symAllocation = [0 14];
nslot = 3;

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

nid = 512;
initialCS = 5;

% Generate the symbols with normal cyclic prefix, intra-slot frequency hopping and group hopping enabled, and orthogonal cover code index 2.

cp = 'normal';
freqHopping = 'enabled';
groupHopping = 'enable';
occi = 2;
sym = nrPUCCH1(ack,sr,symAllocation,cp,nslot, ...
    nid,groupHopping,initialCS,freqHopping,occi)

% Copyright 2018 The MathWorks, Inc.