# ltePUCCH2Indices

PUCCH format 2 resource element indices

## Syntax

• ``ind = ltePUCCH2Indices(ue,chs)``
example
• ``````[ind,info] = ltePUCCH2Indices(ue,chs)``````
example
• ``[___] = ltePUCCH2Indices(ue,chs,opts)``
example

## Description

example

````ind = ltePUCCH2Indices(ue,chs)` returns a matrix of resource element indices for the Physical Uplink Control Channel (PUCCH) Format 2 transmission given structures containing the UE-specific settings, and the channel transmission configuration. ```

example

``````[ind,info] = ltePUCCH2Indices(ue,chs)``` also returns a PUCCH information structure array `info`.```

example

````[___] = ltePUCCH2Indices(ue,chs,opts)` formats the returned indices using option strings defined in the cell array, `opts`.This syntax supports output options from prior syntaxes.```

## Examples

collapse all

### Generate PUCCH Format 2 Indices

Generate PUCCH format 2 RE indices for a 1.4 MHz bandwidth and PUCCH resource index 0. Use default values for all other parameters.

Initialize UE-specific and channel configuration structures. Generate PUCCH format 2 indices.

```ue.NULRB = 6; ue.CyclicPrefixUL = 'Normal'; chs.ResourceIdx = 0; ind = ltePUCCH2Indices(ue,chs); ind(1:4) ```
```ans = 1 2 3 4 ```

### Generate PUCCH Format 2 Indices for Three Antennas

Generate the physical uplink control channel (PUCCH) format 2 indices for three transmit antenna paths, and display the information structure output.

Initialize UE-specific and channel configuration structures. Generate PUCCH 2 indices and information outputs.

```ue.NULRB = 6; ue.CyclicPrefixUL = 'Normal'; chs.ResourceIdx = [0 129 2]; [ind,info] = ltePUCCH2Indices(ue,chs); ```

Because there are three antennas, the indices are output as a three column vector and the `info` output structure contains three elements. View `ind` and the size of `info` to confirm this.

```ind(1:5,:) size(info) ```
```ans = 1 1069 2017 2 1070 2018 3 1071 2019 4 1072 2020 5 1073 2021 ans = 1 3 ```

View the contents of one of the `info` structure elements.

```info(1) ```
```ans = PRBSet: [0 5] RBIdx: 0 ```

### Generate PUCCH Format 2 Indices Varying Indexing Style

Generate the PUCCH format 2 indices for two transmit antenna paths, and output in subscript indexing form.

Initialize UE-specific and channel configuration structures, and the indexing option parameter. Generate PUCCH 2 indices and information outputs.

```ue.NULRB = 6; ue.CyclicPrefixUL = 'Normal'; chs.ResourceIdx = [0 4]; opts = {'sub'}; [ind,info] = ltePUCCH2Indices(ue,chs,opts); ```

Using `'sub'` indexing style, the indices are output in `[subcarrier, symbol, antenna]` subscript form. View the midpoint of `ind` and observe the antenna index change.

```size(ind) ind(118:123,:) ```
```ans = 240 3 ans = 70 14 1 71 14 1 72 14 1 1 1 2 2 1 2 3 1 2 ```

Because there are two antennas, the `info` output structure contains two elements. View the contents of one of the `info` structure elements.

```size(info) info(2) ```
```ans = 1 2 ans = PRBSet: [0 5] RBIdx: 0 ```

## Input Arguments

collapse all

### `ue` — UE-specific settingsstructure

UE-specific settings, specified as a structure containing these fields.

### `NULRB` — Number of uplink resource blocksnonnegative integer

Number of uplink resource blocks, specified as a nonnegative integer.

### `CyclicPrefixUL` — Cyclic prefix length for uplink channels`'Normal'` (default) | optional | `'Extended'`

Cyclic prefix length for uplink channels, specified as `'Normal'` or `'Extended'`.

Data Types: `char`

### `chs` — Channel transmission configurationstructure

Channel transmission configuration, specified as a structure containing the following fields.

### `ResourceIdx` — PUCCH resource indices0 (default) | optional | 0,...,1185 | integer | vector of integers

PUCCH resource indices, specified as an integer or a vector of integers. Values range from 0 to 1185. There is one index for each transmission antenna. These indices determine the cyclic shift and orthogonal cover used for transmission. (${n}_{PUCCH}^{\left(2\right)}$)

### `opts` — Output format options for element resource indices{`'ind'`, `'1based'`} (default) | optional | string | cell array of strings

Output format options for element resource indices, specified as a string or a cell array of strings. You can specify a format for the Indexing style and Index base.

Category Options Description

Indexing style

`'ind' (default)`

The returned indices are in linear index form.

`'sub'`

The returned indices are in `[subcarrier,symbol,port]` subscript row form.

Index base

`'1based' (default)`

Indices returned are one-based.

`'0based'`

Indices returned are zero-based.

Example: `{'sub','0based'}` returns zero-based indices in subscript row form.

## Output Arguments

collapse all

### `ind` — PUCCH format 2resource element indicesinteger column vector | three-column integer matrix

PUCCH format 2 resource element indices, returned as an integer column vector or a three-column integer matrix. By default, the indices are returned in one-based linear indexing form that can directly index elements of a resource matrix. These indices are ordered according to PUCCH format 2 modulation symbol mapping as specified in TS 36.211 [1], Section 5.4. The `opts` input offers alternative indexing formats. The indices for each antenna are in the columns of `ind`, with the number of columns determined by the number of PUCCH resource indices specified in `chs``.``ResourceIdx`.

Example: [1,2,3,4...]

### `info` — PUCCH format 2 informationstructure array

PUCCH format 2 information, returned as a structure array with elements corresponding to each transmit antenna and containing these fields.

### `PRBSet` — Set of PRB indicescolumn vector | two-column matrix

Set of PRB indices, returned as a column vector or two-column matrix corresponding to the resource allocations.

• When returned as a column vector, the resource allocation is the same in both slots of the subframe.

• When returned as a two-column matrix, the resource allocations can vary for each slot in the subframe.

The PRB indices are zero-based.

Example: [0,5]

### `RBIdx` — PUCCH logical resource block indexnonnegative integer

PUCCH logical resource block index, returned as a nonnegative integer. (m)

## References

[1] 3GPP TS 36.211. "Physical Channels and Modulation." 3rd Generation Partnership Project; Technical Specification Group Radio Access Network; Evolved Universal Terrestrial Radio Access (E-UTRA). URL: http://www.3gpp.org.