Advertisement
Guest User

dima zaebal

a guest
Apr 4th, 2020
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. %matplotlib inline
  2. import matplotlib.pyplot as plt
  3. import numpy as np
  4. import math
  5.  
  6.  
  7. with open('data.txt') as f:
  8.     A, Energy, L_max = f.read().splitlines()
  9. A = float(A)
  10. Energy = float(Energy)
  11. L_max = float(L_max)
  12. del_m_square = 7.6 / 10
  13.  
  14.  
  15. fig = plt.figure()
  16. ax = fig.add_subplot(111)
  17. box = [0.25, 0.5, 0.25, 0.25]
  18.  
  19.  
  20. x = np.arange(0.0, L_max, 1)
  21. p = 1 - A * np.sin(del_m_square*x/(Energy))*np.sin(del_m_square*x/(Energy))
  22.  
  23. ax.plot(p)
  24.  
  25. for ax in fig.axes:
  26.     ax.grid(True)
  27. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement