I got so far to fit the data without taking the amount of "NaN" into account.
figure(1)
ecdf(y,'function','survivor');
h=gcf;
dataObjs = findobj(gcf,'-property','YData');
dmy3=dataObjs.XData;
x=dmy3';
dmy4=dataObjs.YData;
y2=dmy4';
Up until now the survival function converges to 0. How can i make it converge to the amount of "NaN" in "y"?