
%matlab-file for plotting figures 1 of linear phase portraits using fun00a.m

p=-1;
a=1;b=0;c=0;d=3;     
t0=0;t1=50;  subplot(221);hold off,t=[];x=[];
xx0=[1 0 1 0 -1 -1 1 -1 0.5 1 -0.5 1 -1 0.5 -0.5 -1];
yy0=[1 1 0 -1 0 1 -1 -1 1 0.5 1 -0.5 0.5 -1 -1 -0.5];
for i=1:16,
x0(1)=xx0(i);x0(2)=yy0(i);[t,x]=ode23('fun00a',[t0,t1],x0);
plot(x(:,1),x(:,2));hold on
end

p=1;
a=-2;b=0;c=0;d=-1;
subplot(222);t=[];x=[];hold off
xx0=[1 0 1 0 -1 -1 1 -1 0.5 1 -0.5 1 -1 0.5 -0.5 -1];
yy0=[1 1 0 -1 0 1 -1 -1 1 0.5 1 -0.5 0.5 -1 -1 -0.5];
for i=1:16,
x0(1)=xx0(i);x0(2)=yy0(i);[t,x]=ode23('fun00a',[t0,t1],x0);
plot(x(:,1),x(:,2));hold on
end



p=1;
a=-1;b=0;c=0;d=1;
subplot(223);t=[];x=[];t1=10;hold off,
xx0=[0 0 1 -1 -1  -1 -1 -1 1 1 1 1 ];
yy0=[0.001 -0.001 0 0 0.02 -0.02 -0.1 0.1 0.1 -0.1 -0.02 0.02];
for i=1:12,
x0(1)=xx0(i);x0(2)=yy0(i);[t,x]=ode23('fun00a',[t0,t1],x0);
plot(x(:,1),x(:,2));hold on
end
axis([-1 1 -1 1]);
