clear all

%%
%
% Test on tent map
n=3000; orbt=zeros(n+1,1); x0=0.8;param=.9999999;orbt(1)=x0;
 for i=1:n
 orbt(i+1)=tent(orbt(i),param);
 end
 
trn=15; % Skip the first trn returning points

 ppnts=orbt(trn+1:end,:);
 ptime=[0:length(ppnts)-1]';

figure(22)
hold off

plot(ppnts(1:end-1),ppnts(2:end),'r.')
 
%% 
length(ptime)
lyexp=lyapunov(ptime,ppnts) % Lyapunov exponent, log base 2.

% return
%%