close all;clear
N=256

h=[1/2;1/2]
figure;freqz(h,1,N,1)

figure;grpdelay(h,1,N,1)

b=[1/2;1/2]
a=[1;-1/2]

figure;freqz(b,a,N,1)

b=[1/2;1/2]/2 % since 6 dB is 2x
figure;freqz(b,a,N,1)

figure;grpdelay(b,a,N,1)

b=1
a=[1;-1/2]

figure;freqz(b,a,N,1)

b=1/2 % 6 dB is 2x
figure;freqz(b,a,N,1)

figure;grpdelay(b,a,N,1)

b=1
a=[1;-0.9]

figure;freqz(b,a,N,1)

b=1/10 % 20 dB is 10x since 20 dB= 20 log_10(10), or 10^(20 dB/20) = 10
figure;freqz(b,a,N,1)

figure;grpdelay(b,a,N,1)


b=1
a=[1;-0.99]

figure;freqz(b,a,N,1)

b=1/100 % 40 dB is 100x since 40 dB= 20 log_10(100), or 10^(40 dB/20) = 100
figure;freqz(b,a,N,1)

figure;grpdelay(b,a,N,1)
