Skip to content

Instantly share code, notes, and snippets.

View MaxNeg8's full-sized avatar

Maximilian Negedly MaxNeg8

  • University of Vienna
  • Vienna, Austria
View GitHub Profile
@MaxNeg8
MaxNeg8 / van_der_pol.py
Created June 23, 2022 15:12
Van der pol oscillator
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]