Advertisement
gronke

Lazzatti 1

Apr 12th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. import pylab
  2.  
  3. r0 = int(10e15)
  4. p0 = 1.7e-14
  5. r = r0
  6. rfinal = int(r*10000)
  7.  
  8. def p(r):
  9.     return p0*pow(r/r0, -3)
  10.  
  11. x = list()
  12. y = list()
  13.  
  14. while (r < rfinal):
  15.     x.append(r)
  16.     y.append(p(r))
  17.     r = r+10e15
  18.  
  19. pylab.figure(0)
  20. pylab.plot(x,y)
  21. pylab.xlim([10e15,10e16])
  22. pylab.ylim([0,10e-15])
  23.  
  24. t0 = int(10e7)
  25. r = r0
  26.  
  27. def t(r):
  28.     return t0*pow(r/r0, -2)
  29.  
  30. w = list()
  31. z = list()
  32.  
  33. while (r < rfinal):
  34.     w.append(r)
  35.     z.append(t(r))
  36.     r = r+10e15
  37.  
  38. pylab.figure(1)
  39. pylab.plot(w,z)
  40. pylab.xlim([10e15,10e16])
  41. pylab.ylim([0,10e7])
  42. pylab.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement