%EE 416 Matlab project 3
%Peter Agliata
%2856-4505

clear *

wp=0.4*pi;
n=0:1:30;
t=n-15;

h=sin(wp*t)./(pi*t);
h(16)=(wp/pi);

stem(t,h);
title('Plot of h(n)');
xlabel('time');
ylabel('h(n)');

freqz(h,1,50,'whole');
title('Plot of h(e^j^w)');

w=(0.54-0.46*cos((2*pi*t)/31));

hf=h.*w;
stem(t,hf);
title('Hamming Window');
xlabel('time');
ylabel('hf(n)');

freqz(hf,1,50,'whole');
title('Plot of hf(e^j^w)');
