h0=-0.075; 
h1=-0.1592; 
h2=-0.2251; 
h3=0.75; 
h4=h2; 
h5=h1; 
h6=h0; 

num=[h0 h1 h2 h3 h4 h5 h6]; 
den=[1 0 0 0 0 0 0]; 

impz(num,den)
grid
xlabel('The figure no.1 is the the impulse response')

figure
freqz(num,den)
xlabel('The figure no.2 is the frequency response')

figure
plot(grpdelay(num,den))

figure
zplane(num,den)
xlabel('The figure no.3 is the the zero-pole diagram')

Fs=4000; 
%x=sin(2*pi*1800*(1:10)/Fs); 

int k
for i=1/Fs:1/Fs:100/Fs
    k=i*Fs;
    x(k)=3*sin(2*pi*1000*i); 
end
%% normalized freq: 1000/4000*2*pi=0.5*pi

for i=101/Fs:1/Fs:200/Fs
       k=i*Fs; 
    x(k)=sin(2*pi*100*i); 
end
%% normalized freq: 100/4000*2*pi=0.05*pi

for i=201/Fs:1/Fs:100/Fs
        k=i*Fs;
    x(k)=0; 
end
%%


figure
subplot(1,2,1)
plot(x); grid
y=filter(num,den,x); 
subplot(1,2,2)
plot(y); grid
