Skip to content

Instantly share code, notes, and snippets.

@Piyush3dB
Last active August 29, 2015 14:18
Show Gist options
  • Save Piyush3dB/d9cda943ed1ae42d28d2 to your computer and use it in GitHub Desktop.
Save Piyush3dB/d9cda943ed1ae42d28d2 to your computer and use it in GitHub Desktop.
Python snippet for a numeric computation of group delay
import numpy as np
N = 20
Nfft = 64
#hn = np.random.rand(N)
hn = np.ones(N)
hnr = hn*np.arange(N)
Tg = np.real(np.fft.fft(hnr, Nfft) / np.fft.fft(hn, Nfft))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment