clear all; 
sigma=10; b=8/3; r=28; y0=[1, 1, 1]; 
lorenz = @(t,y) [sigma*(y(2)-y(1));
                 r*y(1)-y(2)-y(1)*y(3);
                 y(1)*y(2)-b*y(3)];
[t,y] = ode45(lorenz,[0 50],y0); 
p=plot3(y(:,1), y(:,2), y(:,3));

stop
clf
[pks,locs]=findpeaks(y(:,3));
plot(pks(1:end-1), pks(2:end), '.'); 