function epsilon=epsilon_min(Tiese, G, P, L)
n=size(Tiese, 1);
n_k=size(G, 2);
h=1;
d=std(Tiese(:,2),1);
d_vid=mean(Tiese(:,2));
sant=d/d_vid;
if sant<=3
    s=0;
else
   s=std(Tiese(:,1),1); 
end
vid=mean(Tiese(:,1));
% santykis=s/mean(Tiese(:,2));
for i=1:1
    for j=1:n_k
                k=abs(vid-s-G(j));
%         k=abs(vid-G(j));
        e(h,1)=P*abs(sin(k));
        h=h+1;
    end
end
% ep=median(e);
% eps=std(e);
if d<=3
  epsilon=max(e); 
else
  epsilon=mean(e);  
end
% epsilon=max(e);


