% Alpha varies from 3 to 5.
% This simulation with the step "0.001" takes several minutes.
% For faster result a step "0.05" or "0.01" is recommended.
% Interesting results are obtained with a step "0.0001" (or possibly lower).

disp('The simulation takes several minutes ...,')
disp('..., to interrupt simulation, type "ctrl c" in the Command Window, ... ')
disp('..., alpha = 3, ...,5')

global ALPHA

for ALPHA=3:0.001:5;

x0=[0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65 0.65]';
tfinal=150;

[t,x]=ode23(@medioeq,[0 tfinal],x0);

pause(0.001)

plot(x(:,3),x(:,8),'b');
%title('\alpha varies from 3 to 5');
title(['\alpha: ', num2str(ALPHA)]);

xlabel('X(3)');
ylabel('x(8)');
grid;

end


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