%% Resource Blocks
% The 3GPP documents describes a resource block to be a group of resource elements spanning 12 consecutive subcarriers in the frequency domain and one slot in the time domain. For processing efficiency, the LTE Toolbox™, operates on a subframe (two timeslot) basis and describes a resource block pair to represent 12 consecutive subcarriers spanning in the frequency domain and one subframe (two slots) in the time domain. For example, the command ltePDSCHIndices uses the parameter PRBSet to define the set of physical resource block (PRB) indices for a subframe of data.
% Create the cell-wide settings structure and define the PDSCH configuration.

enb.CellRefP = 4;
enb.CFI = 1;
enb.NCellID = 1;
enb.NSubframe = 0;
enb.NDLRB = 6;
enb.CyclicPrefix = 'Normal';
enb.DuplexMode = 'FDD';

pdsch.TxScheme = 'TxDiversity';
pdsch.Modulation = 'QPSK';
pdsch.RNTI = 1;
pdsch.PRBSet = (0:5).';

%
% Create a set of PDSCH PRB indices for the initialized configuration.

pdschIndices = ltePDSCHIndices(enb,pdsch,pdsch.PRBSet);
size(pdschIndices)
pdschIndices(1:10,:)
pdsch

% pdsch.PRBSet can be either a column vector or a two-column matrix. If you provide a column vector, the resource allocation is the same in both slots of the subframe, which means the set of resource indices applies to both subframe time slots. On the other hand, if you provide a two-column matrix, the PRB indices refer to each slot individually.
% Copyright 2012 The MathWorks, Inc.