Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
restrepo
GitHub Repository: restrepo/ComputationalMethods
Path: blob/master/homework/Homework_2018_1_09_1032478036.ipynb
934 views
Kernel: Python 3
from scipy.integrate import odeint import numpy as np %pylab inline
Populating the interactive namespace from numpy and matplotlib
g= -9.8 def f(y, t): return g * t t0=0. t1=3. y0=200 t=np.arange(t0, t1, 0.01) y= odeint(f, y0, t)
plt.plot(t,y) plt.xlabel('$t$') plt.ylabel('$y(t)$')
<matplotlib.text.Text at 0x7f57536a5a90>
Image in a Jupyter notebook