CRS resource element indices


  • ind = lteCellRSIndices(enb)
  • ind = lteCellRSIndices(enb,ports)
  • ind = lteCellRSIndices(enb,ports,opts)


ind = lteCellRSIndices(enb) returns a column vector of resource element (RE) indices for the cell-specific reference signal (RS), given the cell-wide settings in the enb structure. By default, the indices are returned in 1-based linear indexing form that can directly index elements of a 3-D array representing the subframe resource grid for all antenna ports. These indices are ordered as the reference signal modulation symbols should be mapped. Unlike other physical channels and signals, 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 = lteCellRSIndices(enb,ports) returns a column vector of RE indices for antenna ports specified in the vector, ports (0,1,2,3), and cell-wide settings structure, enb. In this case, CellRefP is ignored if present in enb and ports is used instead.


ind = lteCellRSIndices(enb,ports,opts) allows control of the format of the returned indices through a cell array of option strings, opts. These option strings allow for the generation of alternative indexing formats.


collapse all

Generate Cell-Specific Reference Signal RE Indices

Generate zero-based cell-specific reference signal (CRS) resource element (RE) indices in subscript form for antenna port 2.

enb = lteRMCDL('R.0');
enb.NCellID = 10;
ind = lteCellRSIndices(enb,2,{'0based','sub'});
ans =

           4           1           2
          10           1           2
          16           1           2
          22           1           2

In this case, each row of the generated matrix has three columns, which represent subcarrier, symbol, and antenna port, respectively.

Input Arguments

collapse all

enb — eNodeB cell-wide settingsstructure

eNodeB cell-wide settings, specified as a structure that can contain these parameter fields.

Parameter FieldRequired or OptionalValuesDescription

Scalar integer (6,...,110). Standard bandwidth values are 6, 15, 25, 50, 75, and 100. NDLRB also accepts the standardized bandwidths in string format from the set {'1.4MHz', '3MHz', '5MHz', '10MHz', '15MHz', '20MHz'}.

Number of downlink (DL) resource blocks (RBs)


Integer from 0 to 503

Physical layer cell identity.


1, 2, 4

Number of cell-specific reference signal (CRS) antenna ports


'Normal' (default), 'Extended'

Cyclic prefix length


'FDD' (default), 'TDD'

Duplexing mode, specified as:

  • 'FDD' for Frequency Division Duplex or

  • 'TDD' for Time Division Duplex

The following parameters are dependent upon the condition that DuplexMode is set to 'TDD'.


0 (default), 1, 2, 3, 4, 5, 6

Uplink or downlink configuration


0 (default), 1, 2, 3, 4, 5, 6, 7, 8, 9

Special subframe configuration (SSC)


Nonnegative integer

Subframe number.

ports — Antenna portsnumeric vector

Antenna ports, specified as a numeric vector whose elements must be (0, 1, 2, 3).

opts — Index generation optionsstring | cell array of strings

Index generation options, specified as a string or a cell array of strings that can contain the following values.

Indexing style

'ind' (default), 'sub'

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

  • 'ind' — returns the indices in linear index form as a column vector (default)

  • 'sub' — returns the indices in [subcarrier, symbol, antenna] 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 one. Specify '0based' to generate indices where the first value is zero.

Data Types: char | cell

Output Arguments

collapse all

ind — Cell-specific reference signal RE indicescolumn vector | numeric matrix

Cell-specific reference signal RE indices, returned as a column vector. Optionally, can be returned as an NRE-by-3 matrix.

Data Types: uint32

Introduced in R2014a

Was this topic helpful?