Advertisement
vatman

Untitled

Dec 4th, 2023
778
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3.  
  4.  
  5.  
  6. # Создаем массив времени
  7. t = np.linspace(0, 10, 10000)
  8.  
  9. # Вычисляем колебания
  10. #oscillation1 = np.sin(w1 * t)+np.cos(w1 * t)
  11. #oscillation2 = np.sin(w2 * t)+np.cos(w2 * t)
  12. oscillation12=np.sin(w1 * t)+np.cos(w1 * t)+np.sin(w2 * t)+np.cos(w2 * t)
  13. # Строим графики
  14. plt.figure(figsize=(12, 6))
  15. #plt.plot(t, oscillation1, label='w1')
  16. #plt.plot(t, oscillation2, label='w2')
  17. plt.plot(t, oscillation12)
  18. plt.legend()
  19. plt.xlabel('Time')
  20.  
  21. plt.title('колебания')
  22. plt.show()
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement