Skip to content

Instantly share code, notes, and snippets.

@monirulalom
Created September 5, 2018 17:59
Show Gist options
  • Save monirulalom/9beeaf78b3f7bde2ed895a6ac63b6d51 to your computer and use it in GitHub Desktop.
Save monirulalom/9beeaf78b3f7bde2ed895a6ac63b6d51 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
g = 9.8
m = 60.5
c = 0
v_ini = 0
t_ini = 0
t_list = list()
v_list = list()
t_list.append(t_ini)
v_list.append(v_ini)
for i in range(1,20):
t_new = i
t_list.append(t_new)
v_new = v_ini + (g - ((c/m)*v_ini))*(t_new - t_ini)
v_list.append(v_new)
t_ini = t_new
v_ini = v_new
print(v_new)
plt.plot(t_list, v_list, 'b')
plt.plot(t_list, v_list, 'ro')
plt.show()
@mahbubshaun
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment