# priklad pro GNU octave # pouziti: source("octave-test.txt"); # funkce definujici system - kruhovy test function xdot = f(x, t) xdot(1) = x(2); xdot(2) = -x(1); endfunction t = 0:0.1:20; # v jakem case chceme vysledné hodnoty # reseni obyc. dif. rovnic x = lsode("f", [1; 0], t ); # ^^^^^^ pocatecni podminky # vizualizace vysledku xlabel("time"); ylabel("x1,x2"); plot(t, x); figure(); # nove okno - fazova rovina xlabel("x1"); ylabel("x2"); plot(x(:,1), x(:,2));