Beruflich Dokumente
Kultur Dokumente
20
X2
15
10
5
0
-5
0
10
X1
12
14
16
18
20
25
20
X2
15
10
5
0
-5
0
10
X1
12
14
16
18
20
Sample code:
clear
a=10;b=4;
[x1,x2]=meshgrid(0:1:20,0:1:20);
fx1=a-x1-4*x1.*x2./(1+x1.^2);
fx2=b*x1.*(1-(x2./(1+x1.^2)));
quiver(x1,x2,fx1,fx2,'r')
f = @(t,yt) [a-yt(1)-4*yt(1)*yt(2)/(1+yt(1)^2); b*yt(1)*(1-(yt(2)/(1+yt(1)^2)))];
hold on
[~,y]=ode45(f,[0,100],[6,6]);
plot(y(:,1),y(:,2))
[~,y]=ode45(f,[0,100],[0.5,1]);
plot(y(:,1),y(:,2))