Skip to content

Instantly share code, notes, and snippets.

@0xfe
Created February 27, 2020 22:26
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/736216255e9bbcad5929350a29d1b6b6 to your computer and use it in GitHub Desktop.
Save 0xfe/736216255e9bbcad5929350a29d1b6b6 to your computer and use it in GitHub Desktop.
20hz Sine Wave
import numpy as np
import matplotlib.pyplot as plt
# Generate Sine wave
hz = 20
x = np.arange(0, 1, 0.001) # 1 second
y = np.sin(2 * np.pi * hz * x)
plt.figure(figsize=(10, 3))
plt.plot(x, y)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment