function plot_lorenz2(t0,t1,y0,y1,b,s,r)
% Integrates the Lorenz equations starting from two initial conditions y0
% and y1, to investigate sensitive dependence on initial conditions

tspan = [t0, t1];
yzero = y0; yzero1 = y1;
options = odeset('AbsTol',1e-7,'RelTol',1e-4);

[t,y] = ode45(@lorenzode,tspan,yzero,options,b,s,r);
[tt,yy] = ode45(@lorenzode,tspan,yzero1,options,b,s,r);
figure(1)
plot3(y(:,1),y(:,2),y(:,3))
hold on
plot3(yy(:,1),yy(:,2),yy(:,3),'r');
hold off

figure(2)
subplot(2,2,1)
plot(y(:,1),y(:,2)) , xlabel('x'), ylabel('y')
subplot(2,2,2)
plot(y(:,2),y(:,3)) , xlabel('y'), ylabel('z');
subplot(2,2,3)
plot(y(:,1),y(:,3)) , xlabel('x'), ylabel('z');
subplot(2,2,4)
plot(t,y(:,1),'k',tt,yy(:,1),'r') , xlabel('t'), ylabel('x');