function dydt = pendulum_dydt(t,y) % Solve u" + sin u = 0 by setting v = u' and y = [u; v]. u = y(1); v = y(2); dydt = [v; -sin(u)];