
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%filters time domain plot 
%Input:
%   -x:  The array of the amplitude values of the time domain signal
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function x_filtered = filterTimeDomain(x)

index = find(abs(x)>0.1*(max(abs(x))));
index_begin = index(1)-100;
index_end = index_begin+400;

x_filtered = x;
x_filtered(1:index_begin-1) = 0;
x_filtered(index_end+1:end) = 0;

end

