function dydt = f(t,y) % Must define t to use ode45 even if there is no dependent variable % explicitly in the ODE dydt = [y(2); -y(1)];