#
#octave_lsode_lorentz.m
#https://ix86.org/octave/index-main.html?octave_lsode_lorentz
#
function y = lorentz( x, t )
	y = [ 	10*(x(2)-x(1)) ;
		x(1)*(28-x(3)) ;
		x(1)*x(2)-(8/3)*x(3)	] ;
endfunction

function out = octave_lsode_lorentz()
	x0 = [ 3; 15; 1 ];
	t = linspace( 0, 40., 2000 );

	x = lsode( 'lorentz' , x0, t );
	plot3( x(:,1), x(:,2), x(:,3));
	out="";
endfunction
