phase space

Johannes Wolfgang Woger jwwoger at chello.at
Fri Apr 3 07:55:32 CDT 2009


Hi,
I am an newby.

How can I obtain a plot of the phase portrait
of Lotka-Volterra:

octave:92> function xdot = f(x,t)
 >  a = 4;
 >  b = 4;
 >  c = 4;
 >  d = 8;
 >  E = 1;
 >  K = 1;
 >  xdot = zeros(2,1);
 >  xdot(1) = x(1)*(a-b*x(2)-E*x(1));
 >  xdot(2) = x(2)*(d*x(1)-c-K*x(2));
 >  endfunction
octave:93>
octave:93> t = linspace(0,50,100);
octave:94> x = lsode("f", [2,1],t);
octave:95> plot(t,x);


Thanks


More information about the Help-octave mailing list