%% Generate PSSS Indices
% Generate PSSS values and indices. Write the values into the PSSS resource elements in a synchronization subframe (normal cyclic prefix) and display an image of their locations.
% Create a user equipment settings structure and a resource grid that has a 10 MHz bandwidth and normal cyclic prefix.

ue.NSLRB = 50;
ue.CyclicPrefixSL = 'Normal';
ue.NSLID = 1;
subframe = lteSLResourceGrid(ue);

% Generate PSSS indices and display the first five indices. Load the PSSS symbols into the resource grid. Display an image showing the PSSS symbol locations.

psss_indices = ltePSSSIndices(ue);
psss_indices(1:5)

subframe(psss_indices) = ltePSSS(ue);
imagesc(100*abs(subframe));
axis xy;

% Copyright 2012 The MathWorks, Inc.