function xdot = spring(x, t)
  mass = 2; k = 1; beta = .1;
  xdot(1) = x(2);
  xdot(2) = 1 / mass * (-k * x(1) - beta * x(2));
endfunction
