Skip to content

Instantly share code, notes, and snippets.

@0xfe
Created February 28, 2020 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xfe/db8bbd3c1c8635e3b6fb8c2e28c93e20 to your computer and use it in GitHub Desktop.
Save 0xfe/db8bbd3c1c8635e3b6fb8c2e28c93e20 to your computer and use it in GitHub Desktop.
Impulse Signal
points = 256
y = np.zeros(points, dtype="complex64")
y[20] = np.complex(1,0) # stick a 1 into the 20th position
plt.figure(figsize=(10, 3))
plt.bar(np.arange(100), np.absolute(y)[:100]) # Show the first 100 points
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment