function ydot = f(t, y) % F : function to be "integrated" to solve an ODE % % The differential equation is ydot = f(t, y) % % t: time, a scalar. % y: unknown function of time: y = y(t). Can be a vector. % % ydot: time derivative of y: dy/dt. Vector the same size as y. % ydot = y/2;