%% Estimate SISO Channel Using L-LTF
% Create VHT format configuration object. Generate a time-domain waveform for an 802.11ac VHT packet.

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

%
% Multiply the transmitted VHT signal by -0.1 + 0.5i and pass it through an AWGN channel with a 30 dB signal-to-noise ratio.

rxWaveform = awgn(txWaveform*(-0.1+0.5i),30);

%
% Extract the L-LTF field indices and demodulate the L-LTF. Perform channel estimation without frequency smoothing.

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

est = wlanLLTFChannelEstimate(demodSig,vht);

%
% Plot the channel estimate.

scatterplot(est)
grid

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