set(groot, 'defaultlinelinewidth', 5)
%%
A = [1 0; 0 2]
%%
A = [-4 0; 0 -3]
%%
A = [-2 -1; 1 -2]
%%
A = [-0.1 -1; 1 -0.1]
%%
A = [0.1 -1; 1 0.1]

%%
A = [-1 -2; 1 1]

%%
A = [1 1; -2 0]

%% 2-dimensional linear Ordinary Differential Equation
f = @(t,y) A*y;

[t y] = ode45(f, [0 10], [1 1]');

plot(y(:,1),y(:,2),'-', 'Linewidth', 3);

%%
A = [0.1 -1 0; 1 0.1 0; 0 0 -0.8]

%%
A = [-0.1 -1 0; 1 -0.1 0; 0 0 -0.8]

%%
A = [0 1 0; 0 0 1; 0 0 0]

%% 3-dimensional linear Ordinary Differential Equation
f = @(t,y) A*y;

[t y] = ode45(f, [0 20], [1 1 1]');

plot3(y(:,1),y(:,2),y(:,3),'-', 'Linewidth', 3);


%% Lorenz ODE
lorenz = @(t,y) [10*(y(2)-y(1)) ; y(1)*(28-y(3)) - y(2); y(1)*y(2) - 8/3*y(3)];

[t y] = ode45(lorenz, [0 250], [1 1 1]');

plot3(y(:,1),y(:,2),y(:,3),'-', 'Linewidth', 1);
axis equal;
