%% Generate SRS Indices for Two-Port Transmission
% Configure the carrier with default configuration parameters.

carrier = nrCarrierConfig;

% Configure a two-port SRS transmission of 4 OFDM symbols.

srs = nrSRSConfig;
srs.NumSRSPorts = 2;
srs.NumSRSSymbols = 4;

% Set the time-domain starting position of the SRS to 8 and the bandwidth configuration index to 5.

srs.SymbolStart = 8;
srs.CSRS = 5; 

% Generate SRS resource element indices for the specified carrier and SRS configuration parameters.

ind = nrSRSIndices(carrier,srs,'IndexStyle','subscript');

% Verify that the index matrix has three columns corresponding to the [subcarrier, symbol, antenna] subscripts.

size(ind)

% Copyright 2019 The MathWorks, Inc.