Assig1Spring23
Assig1Spring23 import numpy as np import matplotlib.pyplot as plt %matplotlib inline from IPython.core.debugger import set_trace def check_type(y,t): # Ensure Input is Correct return y.dtype == np.floating and t.dtype == np.floating class _Integrator(): def integrate(self,func,y0,t): time_delta_grid = t[1:] – t[:-1] y = np.zeros((y0.shape[0],t.shape[0])) y[:,0] = y0 # Euler Step or Runge-Kutta Second Order Integration Step for […]