MATLAB Examples

Creating an Empty Resource Grid

Create an empty downlink resource grid using two different methods. Valid and equivalent subframe resource grids can be created using the lteDLResourceGrid function or the MATLAB® zeros function.


Initialize required parameters

Create the parameter structure for normal cyclic prefix, nine downlink resource blocks, and one transmit antenna. Also define seven symbols per slot for use in the zeros function only.

enb.CyclicPrefix = 'Normal';
enb.NDLRB = 9;
enb.CellRefP = 1;
noSymbolsSlot = 7;

Create two empty resource grids

Create an empty subframe resource grid, using each method.

resourceGrid1 = lteDLResourceGrid(enb);
resourceGrid2 = zeros(enb.NDLRB*12, noSymbolsSlot*2, enb.CellRefP);

Confirm the grids are equal

Compare the two grid variables for equality using the MATLAB isequal function.

ans =



Both approaches generate the same result. Use either approach to create an empty downlink resource grid. Similarly, an empty uplink resource grid could be created using lteULResourceGrid function or the MATLAB zeros function.