lteNRSIndices

NRS resource element indices

Description

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.

example

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.

Examples

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

Cell-wide settings, specified as a structure containing these fields:

NameValuesDescriptionData Types
NNCellIDInteger in the interval [0, 503]Narrowband physical layer cell identitydouble
NBRefP1, 2Number of NRS antenna portsdouble

Data Types: struct

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

Data Types: double

Output format and index base of generated indices, specified as a character vector, a cell array of character vectors, or a string array. You can specify these options as a single character vector or string scalar by a space-separated list of values placed inside quotation marks. This field can contain any of these values:

OptionValuesDescription
Output format'ind' (default), 'sub'Output format of generated indices, specified as 'ind' or 'sub'. The function returns the indices as a column vector when you specify 'ind'. The function returns the indices as an NRE-by-3 matrix when you specify 'sub', where NRE is the number of resource elements. Each row of the matrix contains the subcarrier, symbol, and antenna port as its first, second, and third entries, respectively.
Index base'1based' (default), '0based'Index base, specified as '1based' or '0based'. To generate indices whose first value is 1, specify '1based'. To generate indices whose first value is 0, specify '0based'.

Example: 'ind 0based', "ind 0based", {'ind','0based'}, and ["ind","0based"] specify the same output options.

Data Types: char | string | cell

Output Arguments

collapse all

NRS 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