The lteDMRSIndices function expect the resource block set allocation to be a vector, not a cell array.
For "R.50", this parameter is set to a cell array, as the resource allocation is dynamic (it changes depending on the subframe number).
The way to use the lteDMRSIndices function is then to input the setting for each subframe, one at a time:
(note the for subframeNr loop added in the code below)
enb = lteRMCDL('R.50');
enb.PDSCH.TxScheme = 'Port7-14';
enb.PDSCH.NLayers = 4;
ntxants = 8;
enb.PDSCH.W = lteCSICodebook(enb.PDSCH.NLayers,ntxants,[0 0]).';
cfg = enb;
for subframeNr = 0:9
cfg.NSubframe = subframeNr;
cfg.PDSCH.PRBSet = enb.PDSCH.PRBSet{subframeNr+1};
subframe = zeros(lteResourceGridSize(cfg,ntxants));
cfg.PDSCH.NTxAnts = size(cfg.PDSCH.W,2);
dmrsInd = lteDMRSIndices(cfg,cfg.PDSCH);
dmrs = lteDMRS(cfg,cfg.PDSCH);
subframe(dmrsInd) = dmrs;
end
Best Answer