Main Content
Create an Empty Resource Grid
This example shows how to create an empty resource grid of the right dimensions for the cell-wide settings specified in structure enb
.
Specify the cell-wide settings in a parameter structure.
enb.CyclicPrefix = 'Normal';
enb.NDLRB = 9;
enb.CellRefP = 2;
Create an empty resource grid by calling the lteDLResourceGrid
function.
resourceGrid1 = lteDLResourceGrid(enb); size(resourceGrid1)
ans = 1×3
108 14 2
The resulting matrix resourceGrid
is 3-dimensional.
Alternatively, you can use the MATLAB® zeros
function. Specify the parameter structure. For normal cyclic prefix, specify seven symbols per slot.
enb.CyclicPrefix = 'Normal';
enb.NDLRB = 9;
enb.CellRefP = 2;
noSymbolsSlot = 7;
Create an empty resource grid. This time, call the MATLAB zeros
function.
resourceGrid2 = zeros(enb.NDLRB*12, noSymbolsSlot*2, enb.CellRefP); size(resourceGrid1)
ans = 1×3
108 14 2
Compare the two resource grids to show they are equal in size and content.
isequal(resourceGrid1,resourceGrid2)
ans = logical
1