%% Perform SC-FDMA Modulation
% Perform SC-FDMA modulation of one subframe of random uniformly distributed noise.
% Initialize UE-specific settings for the specified number of resource blocks.

ue = struct('NULRB',50);

% Obtain the size of the resource array.

d = lteULResourceGridSize(ue);

% Get the resource grid by mapping a randomly generated vector of bits to the relevant modulation symbols, specifying QPSK modulation.

grid = reshape(lteSymbolModulate(randi([0,1],prod(d)*2,1),'QPSK'),d);

% Perform SC-FDMA modulation for the specified UE-specific settings and resource grid.

waveform = lteSCFDMAModulate(ue,grid);

% Copyright 2012 The MathWorks, Inc.