
fs=50;        % sampling rate in Hz
T=1/fs;        % sampling period

load ir.dat
N=length(ir);    % number of points
t=(0:N-1)*T;   % sampling grid

plot(t,ir)
pause

axis([180 190 5.5e5 5.6e5])
pause

f=(0:N-1)*fs/N;
IR=fft(ir);

plot(f,abs(IR));
axis([0 fs 0 1e7])
pause;

plot(f,abs(IR));
axis([0 4 0 1e7])
pause;

% decide to clear out below .6Hz  
IR= (f>.6)'.*IR;
IR= (f<10)'.*IR;
plot(f,abs(IR));
axis([0 4 0 1e7])
pause;

y=abs(ifft(IR));
plot(t,y)
axis([180 190 400 2500])
pause

%zero out above .9Hz
IR= (f<.9)'.*IR;
plot(f,real(IR));
axis([0 4 0 1e7])
pause;


y=real(ifft(IR));
plot(t,y)
axis([180 190 -1200 1200])


