%% Transmit S1G Waveform Through 4x2 MIMO Channel
% Create a S1G waveform generated using four transmit antennas and two spatial 
% streams.

cfg = wlanS1GConfig('NumTransmitAntennas',4,'NumSpaceTimeStreams',2, ...
    'SpatialMapping','Fourier');
txSig = wlanWaveformGenerator([1;0;0;1],cfg);
%% 
% Create a 4x2 MIMO TGah channel and disable large-scale fading effects.
%%
tgahChan = wlanTGahChannel('SampleRate',1e6,'ChannelBandwidth','CBW1', ...
    'NumTransmitAntennas',4,'NumReceiveAntennas',2, ...
    'LargeScaleFadingEffect','None');
%% 
% Pass the transmit waveform through the channel.
%%
rxSig = tgahChan(txSig);
%% 
% Display the spectrum of the two received space-time streams.
%%
saScope = dsp.SpectrumAnalyzer('SampleRate',1e6, ...
    'ShowLegend',true, ...
    'ChannelNames',{'Stream 1','Stream 2'});
saScope(rxSig)