%% Estimate 80 MHz SISO Channel Using L-LTF
% Create a VHT format configuration object. Using these objects, generate a time-domain waveform for an 802.11ac VHT packet.

vht = wlanVHTConfig('ChannelBandwidth','CBW80');
txWaveform = wlanWaveformGenerator([1;0;0;1],vht);

%
% Multiply the transmitted VHT signal by -0.4 + 0.3i and pass it through an AWGN channel.

rxWaveform = awgn(txWaveform*(-0.4+0.3i),30);

%
% Specify the channel bandwidth for demodulation and channel estimation. Extract the L-LTF field indices, demodulate the L-LTF, and perform channel estimation without frequency smoothing.

chanBW = 'CBW80';
idxLLTF = wlanFieldIndices(vht,'L-LTF');
demodSig = wlanLLTFDemodulate(rxWaveform(idxLLTF(1):idxLLTF(2),:),chanBW); 
est = wlanLLTFChannelEstimate(demodSig,chanBW);

%
% Plot the channel estimate.

scatterplot(est)
grid

% The channel estimate matches the complex channel multiplier.
% Copyright 2012 The MathWorks, Inc.