Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. tpoints = np.arange(0, 7200, 0.1)
  2. hpoints = []
  3. h = h0
  4.  
  5. for t in tpoints:
  6. if tap == True:
  7.  
  8. if (tpoints[-1] >= t + 20):
  9. qpoints = np.arange(t, t + 20, 0.1)
  10.  
  11. if (tpoints[-1] < t + 20):
  12. qpoints = np.arange(t, tpoints[-1], 0.1)
  13.  
  14. for q in qpoints:
  15. hpoints.append(h)
  16. h += 0.1 * g(h, t)
  17.  
  18. if tap == False:
  19. hpoints.append(h)
  20. h += 0.1 * f(h, t)
  21.  
  22. if hpoints[-1] >= hsource:
  23. tap = False
  24.  
  25. if hpoints[-1] < hsource:
  26. tap = True
  27. count += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement