Advertisement
MrLokans

La, AM

Sep 30th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. #from pylab import *
  2. import numpy as np
  3. import matplotlib.pyplot as plt
  4.  
  5. X = np.linspace(-5*np.pi*2, 5*np.pi, 256)
  6.  
  7. S1 = np.sin(2*np.pi*440*X)
  8. S2 = np.sin(2*np.pi*166*10**6*X) # Freq as 166 MHz
  9. f = np.zeros_like(X)
  10.  
  11. for i in range(len(X)):
  12.     f[i] = np.sin(X[i]) + S2[i]
  13.  
  14.  
  15.  
  16. plt.figure(1)
  17.  
  18. plt.subplot(3, 1, 1)
  19. plt.plot(X, S1, color="red")
  20.  
  21. plt.subplot(3, 1, 2)
  22. plt.plot(X, S2, color="yellow")
  23.  
  24. plt.subplot(3, 1, 3)
  25. plt.plot(X, f, color="orange")
  26.  
  27. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement