view test/octave.test/diffeq/lsode-2.m @ 5301:9302581b820d ss-2-9-2

[project @ 2005-04-22 17:08:07 by jwe]
author jwe
date Fri, 22 Apr 2005 17:09:11 +0000
parents 3aa0e187901c
children
line wrap: on
line source

function xdotdot = f (x, t)
  xdotdot = [x(2); -x(1)];
endfunction

x0 = [1; 0];
t = [0; 2*pi];
tol = 100 * dassl_options ("relative tolerance");

x = lsode ("f", x0, t);

y = [1, 0; 1, 0];

all (all (abs (x - y) < tol))