
c=0.5;
L=0.1:0.1:2.0;
result = zeros(1,length(L));

for itr=1:length(L)
    disp(itr);
    result(itr)=persistenceProbability(L(itr),256,c);
end

% 
% 
% 
% 
ref=-0.1;
figure

plot(L,log(result),'*-');
hold on

plot(L,-0.0835816 - 0.39947*L,'-black');
hold on

grid minor


% kappahat=[0.023, 0.112, 0.399, 1.099, 2.493, 4.858, 8.468, 13.540, 20.574,29.302, 40.52];
% kappatilde=[0.024, 0.112, 0.397, 1.099, 2.492, 4.856, 8.450, 13.529, 20.351, 29.108, 39.992];
% L=1.5:(-0.5):(-3.5);
% 
% x=-4:0.01:-0.1;
% result = zeros(1,length(x));
% parfor itr = 1:length(x)
%     result(itr)=-kappa(x(itr));
% end
% 
% figure
% % 
% % plot(L,kappahat,'* r');
% % hold on
% 
% plot(x,result,'-black');
% hold on
% 
% grid minor

