%% Generate PDSCH RE Indices
% This example generates the 0-based PDSCH resource element (RE) indices mapping in linear index form for the 4-antenna case.
% Create the cell-wide settings structure, enb.

enb = lteRMCDL('R.14');
enb.NDLRB = 6;
enb.CFI = 1;
enb.PDSCH.PRBSet = (1:enb.NDLRB-1).';

%
% Generate PDSCH RE indices, specifying the 0-based and linear options.

ind = ltePDSCHIndices(enb,enb.PDSCH, ...
    enb.PDSCH.PRBSet,{'0based','ind'});
ind(1:10,:)

% The result, ind, is a matrix of 0-based mapping indices in linear index form. Since this is example is for the 4-antenna case, ind, has 4 columns.
% Copyright 2012 The MathWorks, Inc.