Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import numpy as np
- i = np.sin(np.linspace(0, np.pi * 2, 1000))
- q = np.cos(np.linspace(0, np.pi * 2 * 4, 1000))
- plt.ion()
- while True:
- plt.pause(1/1000)
- i = np.roll(i, 10)
- q = np.roll(q, 5)
- m = np.sqrt(i**2 + q**2)
- plt.cla()
- plt.plot(i)
- plt.plot(q)
- plt.plot(m)
- plt.legend(['iData', 'qData', 'magnitude'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement