%% Segment-Parse Symbols
% Segment-deparse and segment-parse the symbols in four OFDM symbols for a VHT configuration with a channel bandwidth of 160 MHz and two spatial streams.
%
% Define the input parameters. Since the channel bandwidth is 160 MHz, set the number of data subcarriers to 468 and the number of frequency segments to two.

chanBW = 'CBW160';
numSD = 468;
numSym = 4;
numSS = 2;
numSeg = 2;

%
% Create the input sequence of symbols.

data = randi([0 1],numSD/numSeg,numSym,numSS,numSeg);

%
% Segment-deparse the symbols into data subcarriers. The first dimension of the parsed output accounts for the total number of data subcarriers.

deparsedData = wlanSegmentDeparseSymbols(data,chanBW);
size(deparsedData)

%
% Segment-parse the symbols into data subcarriers. The size of the output is equal to the size of the original sequence.

segments = wlanSegmentParseSymbols(deparsedData,chanBW);
size(segments)

% Copyright 2012 The MathWorks, Inc.