%% Generate Zero-Based PSBCH Indices
% Generate PSBCH indices using zero-based indexing style. Compare these indices to one-based indices.
% Create a user equipment settings structure with 10 MHz bandwidth and normal cyclic prefix.

ue.NSLRB = 50;
ue.CyclicPrefixSL = 'Normal';
ue.NSLID = 1;

%
% Generate PSBCH zero-based indices. View the first five indices.

psbch_indices = ltePSBCHIndices(ue,'0based');
psbch_indices_size = size(psbch_indices)
psbch_indices(1:5)

%
% Generate PSBCH one-based indices and view the first five indices.

psbch_indices = ltePSBCHIndices(ue,'1based');
psbch_indices_size = size(psbch_indices)
psbch_indices(1:5)

% For zero-based indexing, the first assigned index is one lower than the one-based indexing style.
% Copyright 2012 The MathWorks, Inc.