-
-
Save monirulalom/9beeaf78b3f7bde2ed895a6ac63b6d51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks