MATLAB Examples

Create a Cell-Wide Settings Structure

This example shows how to create a cell-wide settings structure. In particular, you can create a parameter structure, enb, that has all the fields required by the lteCFI, ltePCFICH, and |ltePCFICHIndices functions.

Create a new parameter structure, enb, with only one field, CFI.

enb.CFI = 1;

Create a 32-element bit vector, cw, representing the rate 1/16 block encoding of the control format indicator (CFI) value. To do so, call the lteCFI function. Provide enb as an input argument.

cw = lteCFI(enb);

Add additional fields to the parameter structure, enb.

enb.NCellID = 0;
enb.CellRefP = 1;
enb.NSubframe = 0;
enb.NDLRB = 9;

Generate the PCFICH complex symbols by calling the ltePCFICH function, providing the enb structure and the cw bit vector as input arguments.

sym = ltePCFICH(enb,cw);

Although ltePCFICH does not require that enb have the NDLRB field, this does not cause a problem. In this case, the function ignores any non-required fields.

Generate the PCFICH mapping indices by calling the ltePCFICHIndices function, providing the enb structure as an input argument.

ind = ltePCFICHIndices(enb);

Although ltePCFICHIndices does not require the enb.NSubframe field, it does not cause a problem. The function ignores any fields that it does not require.

You can remove fields from a structure using the MATLAB® rmfield function but, as shown, removing the field is not necessary.