NRS resource element indices


ind = lteNRSIndices(enb)
ind = lteNRSIndices(enb,ports)
ind = lteNRSIndices(enb,opts)
ind = lteNRSIndices(enb,ports,opts)


ind = lteNRSIndices(enb) returns a column vector of resource element (RE) indices for the narrowband reference signal (NRS), given the cell-wide settings in the enb structure. By default, the indices are returned in 1-based linear indexing form. Using this form, you can directly index elements of a 3-D array representing the subframe resource grid for all antenna ports. The indices are ordered as the reference signal modulation symbols are mapped. Alternative indexing formats can also be generated. The indices for multiple antennas are concatenated into a single column rather than returned in a matrix with a column for each antenna. The indices for each antenna are concatenated because the number of indices varies across the antenna ports.

ind = lteNRSIndices(enb,ports) returns a column vector of RE indices for antenna ports specified in the ports vector and enb cell-wide settings structure. In this case, lteNRSIndices ignores the NBRefP field of enb and uses ports instead.

ind = lteNRSIndices(enb,opts) formats the returned indices using options specified by opts.


ind = lteNRSIndices(enb,ports,opts) returns the RE indices for antenna ports specified in the ports vector and formats them using options defined in opts.


collapse all

Generate 0-based narrowband reference signal RE indices in subscript form for antenna port 1. Each row of the generated matrix has three columns representing the subcarrier, symbol, and antenna port, respectively.

Create cell-wide settings of the eNodeB structure.

enb.NNCellID = 10;
enb.NBRefP = 2;

Generate the 0-based narrowband reference signal RE indices.

ind = lteNRSIndices(enb,1,{'0based','sub'})
ind = 8×3

     1     5     1
     7     5     1
     4     6     1
    10     6     1
     1    12     1
     7    12     1
     4    13     1
    10    13     1

Input Arguments

collapse all

eNodeB cell-wide settings, specified as a structure containing these parameter fields.

Parameter FieldRequired or OptionalValuesDescription

Nonnegative integer

Narrowband physical layer cell identity


1, 2

Number of transmit antenna ports for NB-IoT eNodeB

Antenna ports, specified as a numeric vector whose elements must be 0 or 1. Ports 0 and 1 stand for NRS antenna ports 2000 and 2001, respectively.

Index generation options, specified as a character vector, cell array of character vectors, or string array. For convenience, you can specify several options as a single character vector or string scalar by a space-separated list of values placed inside the quotes. Values for opts when specified as a character vector include (use double quotes for string):

Indexing style

'ind' (default), 'sub'

Style for the returned indices, specified as one of the following options.

  • 'ind' — Return the indices in linear index form as a column vector.

  • 'sub' — Return the indices in [subcarrier, symbol, port] subscript row style. The number of rows in the output, ind, is the number of resource elements (NRE). Thus, ind is an NRE-by-3 matrix.

Index base

'1based' (default), '0based'

Base value of the returned indices. Specify '1based' to generate indices where the first value is 1. Specify '0based' to generate indices where the first value is 0.

Example: 'ind 1based', "ind 1based", {'ind','1based'}, or ["ind","1based"] specify the same formatting options.

Data Types: char | string | cell

Output Arguments

collapse all

Narrowband reference signal RE indices, returned as a numeric column vector or matrix, depending on the indexing style specified in opts:

  • If you specify linear indexing (default), then ind is a column vector.

  • If you specify subscript row style indexing, then ind is an NRE-by-3 matrix, where NRE is the number of resource elements.

Data Types: uint32

Introduced in R2018a