function F=my_odefun(t,x) %x is the state vector %F is the velocity vector %t is the time. Note, you have to use this t argument, even if it is %not used in defining the velocity! %Here is an example for dx1_dt=x2, x2_dt=-x1 x1=x(1); x2=x(2); dx1_dt= x2; dx2_dt=-x1; F=[dx1_dt ; dx2_dt ] ;