Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- # Создаем массив времени
- t = np.linspace(0, 10, 10000)
- # Вычисляем колебания
- #oscillation1 = np.sin(w1 * t)+np.cos(w1 * t)
- #oscillation2 = np.sin(w2 * t)+np.cos(w2 * t)
- oscillation12=np.sin(w1 * t)+np.cos(w1 * t)+np.sin(w2 * t)+np.cos(w2 * t)
- # Строим графики
- plt.figure(figsize=(12, 6))
- #plt.plot(t, oscillation1, label='w1')
- #plt.plot(t, oscillation2, label='w2')
- plt.plot(t, oscillation12)
- plt.legend()
- plt.xlabel('Time')
- plt.title('колебания')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement