%% Synchronize and Demodulate Test Model Output
% Synchronization and demodulation of Test Model output which has been delayed by five samples.
% Initialize cell-wide parameters structure. Generate waveform for test model 1.1 with 5MHz bandwidth. A five sample delay is achieved by inserting five zeros at the beginning of the waveform. Compute and display the offset. Perform demodulation of the waveform accounting for the offset delay by adjusting waveform start index.

enb = lteTestModel('1.1','5MHz');
tx = [0; 0; 0; 0; 0; lteTestModelTool(enb)];

offset = lteDLFrameOffset(enb,tx)
rxGrid = lteOFDMDemodulate(enb,tx(1+offset:end));

% Copyright 2012 The MathWorks, Inc.