I am doing the homework in Python and have the following as a solution for 1/2 Nyquist. Â This is adding another delay (2 samples) in addition to the one sample delay which seems to work very well. Â However, when trying to use the same idea for 1/4 Nyquist, I found that it does not seem to translate well. Â That is, having 4 delay likes (each one more sample in time more than the last) is perhaps not the real solution after all. Â Can you give me any advice?

# 1/2 Nyquist

x = wpf.halfNyq()

y = np.full_like(x,0,dtype=float)

a0, a1 = 0.5, 0.5

xn1, xn2 = 0.0, 0.0

x = wpf.halfNyq()

y = np.full_like(x,0,dtype=float)

a0, a1 = 0.5, 0.5

xn1, xn2 = 0.0, 0.0

for n in range(np.size(x)):

Â Â y[n] = a0 * x[n] + a1 * xn2

Â Â xn2 = xn1

Â Â xn1 = x[n]

Â Â y[n] = a0 * x[n] + a1 * xn2

Â Â xn2 = xn1

Â Â xn1 = x[n]

Thank you very much! Â So far, the book is really great!

]]>