%% 256QAM Demapping
% Perform a 256QAM demapping, as defined in IEEE®  802.11ac™-2013, Section 22.3.10.9.1.
%
% Create the sequence of data bits.

bits = randi([0 1],416,1,'int8');

% Perform the constellation mapping on the data bits by using a 256QAM modulation. The size of the output returned equals the size of the input sequence divided by eight.

numBPSCS = 8;
mappedData = wlanConstellationMap(bits,numBPSCS);
size(mappedData)

%
% Perform the 256QAM constellation demapping. Because the default demapping type is soft, the output is a vector of soft bits.

noiseVar = 0;
demappedData = wlanConstellationDemap(mappedData,noiseVar,numBPSCS);
size(demappedData)

% Copyright 2012 The MathWorks, Inc.