Skip to content
Snippets Groups Projects
Commit fc5edd7a authored by Delvigne Frank's avatar Delvigne Frank
Browse files

Upload New File

parent acb10c10
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 1 22:37:15 2024
@author: delvigne
"""
import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt
# function that returns dy/dt
def model(var, t, param):
dvardt = ...
return dvardt
# initial condition and parameters
var0 = # variable at time zero
param = # parameter value
# time points
t = np.linspace(0, entime) # time points
# solve ODE
var = odeint(model, var0, t, args=(param,))
# plot results
plt.plot(t, X)
plt.xlabel('label x')
plt.ylabel('label y')
plt.grid()
plt.show()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment