%% Perform SC-FDMA Modulation for Multitone NB-IoT with Windowing
% Perform SC-FDMA modulation of ten time slots of uniformly distributed noise, specifying a multitone NB-IoT downlink configuration and a windowing value.
% Initialize the UE-specific settings by specifying the NB-IoT uplink subcarrier spacing.

ue.NBULSubcarrierSpacing = '15kHz';

% Get the resource grid for the specified number of time slots.

NSlots = 10; % Number of slots in the generated waveform
dims = [12 7*NSlots];
grid = reshape(lteSymbolModulate(randi([0,1],prod(dims)*2,1),'QPSK'),dims);

% Specify a windowing value of 6.

windowing = 6;

% Perform SC-FDMA modulation and display the first five symbols of the modulated waveform.

waveform = lteSCFDMAModulate(ue,grid,windowing);
disp(waveform(1:5));

%
% Copyright 2018 The MathWorks, Inc.