% Test problem #5

warning off all
f = @(t,x) [(2+x(1))*(x(2)-x(1));(4-x(1))*(x(2)+x(1))];
figure; hold on
for a = -3:1.0:6
    for b= -1:1.0:4
        [t,xa] = ode45(f,[0 1],[a b]);
        plot(xa(:,1),xa(:,2))
        [t,xa] = ode45(f,[0 -1],[a b]);
        plot(xa(:,1),xa(:,2))
    end
end
axis([-3 6 -2 6])
