%% TGax Channel Impulse Response
% Obtain a channel impulse response by filtering an impulse through a TGax channel.
%
% Create an impulse.

input = zeros(100,1);
input(10) = 1;

%
% Create the TGax channel System Object with path loss and shadowing, two penetrated floors, and a sampling rate of 1 GHz.

tgax = wlanTGaxChannel;
tgax.LargeScaleFadingEffect = 'Pathloss and shadowing';
tgax.NumPenetratedFloors = 2;
tgax.RandomStream = 'mt19937ar with seed';
tgax.Seed = 10;
tgax.SampleRate = 1e9;

%
% Plot the output impulse response of the channel.

figure
time = (1/tgax.SampleRate)*(0:length(input)-1);
stem(time,abs(tgax(input)))
xlabel('Time (s)')
ylabel('Amplitude')
title('Channel Impulse Response')

% Copyright 2012 The MathWorks, Inc.