[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
phase space
From: |
Johannes Wolfgang Woger |
Subject: |
phase space |
Date: |
Fri, 03 Apr 2009 14:55:32 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090302) |
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
- phase space,
Johannes Wolfgang Woger <=