Generate PBCH resource element indices



[ind,info] = nrPBCHIndices(ncellid) returns the resource element indices ind for the physical broadcast channel (PBCH) and related index information info. The function implements TS 38.211 Section [1]. The corresponding physical layer cell identity number is ncellid. The returned indices are one-based using linear indexing form. This indexing form can directly index the elements of a 240-by-4 matrix corresponding to the Synchronization Signal / Physical Broadcast Channel (SS/PBCH) block. The order of the indices indicates how the PBCH modulation symbols are mapped.

[ind,info] = nrPBCHIndices(ncellid,Name,Value) specifies additional index formatting options by using one or more name-value pair arguments. Unspecified options take default values.


collapse all

Generate the 432 resource element indices associated with the PBCH symbols within a single SS/PBCH block for a given cell identity.

ncellid = 17;    
indices = nrPBCHIndices(ncellid);

Input Arguments

collapse all

Physical layer cell identity number, specified as an integer from 0 to 1007.

Data Types: double

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'IndexStyle','subscript','IndexBase','0based' specifies nondefault resource element index formatting properties.

Resource element indexing form, specified as the comma-separated pair consisting of 'IndexStyle' and one of these values:

  • 'index' — The indices are in linear index form.

  • 'subscript' — The indices are in [subcarrier, symbol, antenna] subscript row form.

Data Types: char | string

Resource element indexing base, specified as the comma-separated pair consisting of 'IndexBase' and one of these values:

  • '1based' — The index counting starts from one.

  • '0based' — The index counting starts from zero.

Data Types: char | string

Output Arguments

collapse all

PBCH resource element indices, returned as one of the following.

  • column vector — When 'IndexStyle' is 'index'.

  • M-by-3 matrix — When 'IndexStyle' is 'subscript'. The matrix rows correspond to the [subcarrier, symbol, antenna] subscripts based on the number of subcarriers and OFDM symbols in a SS/PBCH block, and the number of antennas, respectively.

Depending on 'IndexBase', the indices are either one-based or zero-based.

Data Types: uint32

Characteristic information about PBCH indices, returned as a structure with the following fields.

Parameter FieldValueDescription


Number of coded and rate matched PBCH data bits.



Number of coded and rate matched PBCH data symbols. Gd is equal to the number of rows in the PBCH indices.


[1] 3GPP TS 38.211. “NR; Physical channels and modulation.” 3rd Generation Partnership Project; Technical Specification Group Radio Access Network.

Extended Capabilities

Introduced in R2018b