Skip to content

Instantly share code, notes, and snippets.

Avatar

Maximilian Negedly MaxNeg8

  • Joined Jun 15, 2022
View GitHub Profile
@MaxNeg8
MaxNeg8 / van_der_pol.py
Created Jun 23, 2022
Van der pol oscillator
View van_der_pol.py
import scipy as sc
import numpy as np
from scipy import integrate
from matplotlib import pyplot as plt
from matplotlib.ticker import (MultipleLocator, FormatStrFormatter, AutoMinorLocator, AutoLocator)
def osz(y, t, gamma1, gamma2, omega0):
x, p = y
dydt = [p, -(-gamma1 + gamma2 * x**2)*p - omega0**2 * x]