a=.5;
b=.05;
total=50;
dt=.05;
N=floor(total/dt)+1;
X=zeros(N,1);
T=zeros(N,1);
Y=zeros(N,1);
X(1)=0.0;
Y(1)=0.0;
T(1)=0.0;
for j=2:N
x=X(j-1);
y=Y(j-1);
xp=a-b*x-x*y*y ;
yp=b*x+x*y*y -y;
X(j)=x+dt*xp;
Y(j)=y+dt*yp;
T(j)=T(j-1)+dt;
end
plot(X,Y)
