%% Generate Matrix of CSI-RS RE Indices
% This example shows how to generate a matrix of CSI-RS RE linear indices for ports 15 to 22 of a 10 MHz downlink subframe 0 resource grid.
% Create a 10 MHz, downlink, subframe 0 configuration parameter structure. Set the number of antenna ports to 8, the CSI-RS configuration to 0, and Icsi-rs to 5.

rmc = lteRMCDL('R.2');
rmc.CSIRefP = 8;
rmc.CSIRSConfig = 0;
rmc.CSIRSPeriod = 5;

%
% Generate a matrix of linear indices with eight columns.

csirs2 = lteCSIRSIndices(rmc,'mat');
size(csirs2)

% Copyright 2012 The MathWorks, Inc.