%% Map Non-Precoded DM-RS Symbols to Grid
% Map non-precoded DM-RS symbols onto an 4 layer grid, and clear the REs which should not be used because of the DM-RS of other ports.
% Initialize cellwide settings for RMC 'R.1' (10 MHz bandwidth, 1 RB allocation) and change to Release 10 transmission ('Port7-14'). Generate and map DM-RS clearing the REs that should not be used because of the DM-RS on other ports.

enb = lteRMCDL('R.1');
enb.PDSCH.TxScheme = 'Port7-14';
enb.PDSCH.NLayers = 4;

subframe = ones(lteResourceGridSize(enb,enb.PDSCH.NLayers));
dmrsInd = lteDMRSIndices(enb,enb.PDSCH,'rs+unused');
dmrs = lteDMRS(enb,enb.PDSCH,'rs+unused');
subframe(dmrsInd) = dmrs;

size(dmrs)
size(dmrsInd)
size(subframe)

% Copyright 2012 The MathWorks, Inc.