%% Decode MIB-SL Message
% Decode the 40-bit MIB-SL message, creating a received parameter structure from the message.
% Initialize a UE-specific configuration structure with 5 MHz bandwidth for TDD.

ue.NSLRB = 25;
ue.DuplexMode = 'TDD';
ue.TDDConfig = 6;
ue.NFrame = 5;
ue.NSubframe = 1;
ue.InCoverage = 1

%
% Generate the 40-bit MIB-SL message using the ue structure.

mibsl = lteSLMIB(ue);

%
% Convert the MIB-SL bit vector back into a parameter set. Compare this parameter set with the transmission set.

rxparams = lteSLMIB(mibsl)
isequal(rxparams,ue)

% Copyright 2012 The MathWorks, Inc.