Skip to content

Instantly share code, notes, and snippets.

@Muhammad-Yunus
Created April 15, 2020 00:57
Show Gist options
  • Save Muhammad-Yunus/077a51daae84c7b56ef56486dac53764 to your computer and use it in GitHub Desktop.
Save Muhammad-Yunus/077a51daae84c7b56ef56486dac53764 to your computer and use it in GitHub Desktop.
Python scikit - Ordinary Differential Equation
# solve the ODE problem for three different values of the damping ratio
y1 = odeint(dy, y0, t, args=(0.0, w0)) # undamped
y2 = odeint(dy, y0, t, args=(0.1, w0)) # under damped
y3 = odeint(dy, y0, t, args=(1.1, w0)) # critial damping
y4 = odeint(dy, y0, t, args=(5.0, w0)) # over damped
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment