function L=lyapunov(x,y,N)
% computes the largest Lyapunov exponent
v=[1 1];
factor = 0;
for t=1:N
	v=DHenon(x,y,v);
	[x,y]=Henon(x,y);
	if(norm(v)>1000);
		v = v/1000;
		factor = factor+1;
	end
	mult(t)=(norm(v))^(1/t)*10^(3*factor/t);
end
plot(mult);
L = log(mult(N));