Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tpoints = np.arange(0, 7200, 0.1)
- hpoints = []
- h = h0
- for t in tpoints:
- if tap == True:
- if (tpoints[-1] >= t + 20):
- qpoints = np.arange(t, t + 20, 0.1)
- if (tpoints[-1] < t + 20):
- qpoints = np.arange(t, tpoints[-1], 0.1)
- for q in qpoints:
- hpoints.append(h)
- h += 0.1 * g(h, t)
- if tap == False:
- hpoints.append(h)
- h += 0.1 * f(h, t)
- if hpoints[-1] >= hsource:
- tap = False
- if hpoints[-1] < hsource:
- tap = True
- count += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement