%% Generate SRS Symbols 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;

% The SRS must be located in the last six symbols of the slot. 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 symbols for the specified carrier and SRS configuration parameters.

[sym,info] = nrSRS(carrier,srs);

% Verify that the symbols vector contains two columns corresponding to the two-port transmission.

size(sym)

% Verify the number of SRS symbols per port.

isequal(info.SeqLength*srs.NumSRSSymbols,size(sym,1))

% Copyright 2019 The MathWorks, Inc.