% This is a matlab m-file that
% solves the LORENZ equations with ODE45
% (DMA, 5-28-07)
%
%
yinit=[0;1;0]';
tinit=0;
tfinal=100;
tspan=[tinit tfinal];

[t,y]=ode45('fun_lorenz',tspan,yinit);

subplot(3,2,1)
plot(t,y(:,1));
xlabel('time');ylabel('y_1');

subplot(3,2,2)
plot(t,y(:,2))
xlabel('time');ylabel('y_2');

subplot(3,2,3)
plot(t,y(:,3))
xlabel('time');ylabel('y_3');

subplot(3,2,4)
plot(y(:,1),y(:,2))
xlabel('y_1');ylabel('y_2');

subplot(3,2,5)
plot(y(:,1),y(:,3))
xlabel('y_1');ylabel('y_3');

subplot(3,2,6)
plot(y(:,2),y(:,3))
xlabel('y_2');ylabel('y_3');

[row,col]=size(y)
y(row,:)
