% Example: Spiral-Source

clear all
tfinal=100;
[t xa]=ode23(@spiralsource,[0 tfinal],[0 -0.01]);
[t xb]=ode23(@spiralsource,[0 tfinal],[0.05 -0.05]);
[t xc]=ode23(@spiralsource,[0 tfinal],[0.01 0]);
[t xe]=ode23(@spiralsource,[0 tfinal],[0 0.01]);
[t xf]=ode23(@spiralsource,[0 tfinal],[-0.05 0.05]);
[t xg]=ode23(@spiralsource,[0 tfinal],[-0.01 0]);
[t xh]=ode23(@spiralsource,[0 tfinal],[-0.05 -0.05]);

plot(xa(:,1),xa(:,2),'b');
hold on
plot(xb(:,1),xb(:,2),'b');
hold on
plot(xc(:,1),xc(:,2),'b');
hold on
%plot(xd(:,1),xd(:,2),'b');
hold on
plot(xe(:,1),xe(:,2),'b');
hold on
plot(xf(:,1),xf(:,2),'b');
hold on
plot(xg(:,1),xg(:,2),'b');
hold on
plot(xh(:,1),xh(:,2),'b');
xlabel('X1');
ylabel('X2');
title('Spiral Source')
axis([-5 5 -5 5])
grid


% "Complex and Chaotic Nonlinear Dynamics. 
% Advances in Economics and Finance, 
% Mathematics and Statistics" 
% T.Vialar, Springer 2009
% Copyright(c).