function xdot = second( t, x) % Second: simple second-order dynamics A = [ 0 -1; 1 0]; xdot = A*x;