%% Configure PRACH Preamble Format
% Create a PRACH configuration object with default properties. The default configuration object defines a PRACH configuration with long preamble format 0, based on TS 38.211 Table 6.3.3.2-2.

prach = nrPRACHConfig;

% To consider a different PRACH configuration table as a basis, for example Table 6.3.3.2-3 for FR1 and unpaired spectrum, update the duplex mode property.

prach.DuplexMode = 'TDD';

% To change the PRACH preamble format, you must update the ConfigurationIndex property of the object based on Table 6.3.3.2-3. To lookup a suitable value, access this table through the ConfigurationsFR1Unpaired field of the Tables property.

prach.Tables.ConfigurationsFR1Unpaired(:,:)

% To change the preamble from format 0 to format A1, set the ConfigurationIndex property to any value from 67 to 86.

prach.ConfigurationIndex = 86;

% Verify that the object updates the preamble format correctly.

isequal(prach.Format,'A1')

% Copyright 2019 The MathWorks, Inc.