% plot_BuildingsFreqResponse - plot frequency response from ray data

% load data
load PropData;       % loads PropData structure

BW = 10e6;           % bandwidth to evaluate
N  = 1000;           % number of points to plot
fc = 1e9;            % carrier frequency

ff = (0:N-1)/N*BW - BW/2; % frequency axis from -BW/2 to (nearly) BW/2

tau = PropData.Delay/1e9; % delays were measured in nanoseconds.

HH = PropData.Field.*exp(-j*2*pi*fc*tau) * exp(-j*2*pi*tau'*ff);

plot( ff/1e6, 20*log10(abs(HH)) )
xlabel( 'Frequency (MHz)')
ylabel( '|Frequency Response| (dB)')
grid

%% Store name of script for automated figure generation
ScriptName = mfilename;
