%% Create PUSCH PT-RS Object
% Create a default PUSCH configuration object. Enable the PT-RS configuration and transform precoding for a DFT-s-OFDM waveform.

pusch = nrPUSCHConfig;
pusch.EnablePTRS = 1;
pusch.TransformPrecoding = 1;

% Create a default PT-RS configuration object for the PUSCH. Set number of PT-RS samples to 4, number of PT-RS groups to 8, and PT-RS scrambling identity to 750.

ptrs = nrPUSCHPTRSConfig;
ptrs.NumPTRSSamples = 4;
ptrs.NumPTRSGroups = 8;
ptrs.NID = 750;

% Assign the PUSCH PT-RS configuration object to the PTRS property of PUSCH configuration object.

pusch.PTRS = ptrs;

% Display the properties for PUSCH PT-RS configuration object and PUSCH configuration object, respectively.

disp(pusch)
disp(pusch.PTRS)

% Copyright 2019 The MathWorks, Inc.