Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #from pylab import *
- import numpy as np
- import matplotlib.pyplot as plt
- X = np.linspace(-5*np.pi*2, 5*np.pi, 256)
- S1 = np.sin(2*np.pi*440*X)
- S2 = np.sin(2*np.pi*166*10**6*X) # Freq as 166 MHz
- f = np.zeros_like(X)
- for i in range(len(X)):
- f[i] = np.sin(X[i]) + S2[i]
- plt.figure(1)
- plt.subplot(3, 1, 1)
- plt.plot(X, S1, color="red")
- plt.subplot(3, 1, 2)
- plt.plot(X, S2, color="yellow")
- plt.subplot(3, 1, 3)
- plt.plot(X, f, color="orange")
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement