[edit: correct spelling and grammar]
I put the data in a text file so it is not in your code. It appears that the data are interpreted as being samples of a random variable, which have been sorted into ascending order.
Your question and the comments in the code indicate you want to fit an exponential distribution to the data:
The max. likelihood estimate (MLE) for lambda is 1/mean(x)
Therefore I have computed the CDF with this estimate, and I have added it to the plot. Of course your data shows signs of thresholding and saturation, which violate the assumptions used in the MLE derivation. Thresholding and saturation are types of data censoring. Google, or search matlab answers, for more info on advanced strategies for fitting censored data, if that is of interest.
In the code below, I computed the MLE and added the corresponding CDF to the plot. This method of fitting does not depend on a generated linespace vector, which was your original concern.
z=load('statdata.txt');
cdfplot(z)
hold on
x = linspace(0,1,length(z));
fitfunc = fittype(@(B,C,x) 0.4*exp(B*x.^C));
x0 = [10 0.5];
f = fit(x',z,fitfunc,'StartPoint',x0)
coeffvals = coeffvalues(f)
lambda=1/mean(z); %MLE for exponential distribution
cdf_mle=1-exp(-lambda*[1:100]); %CDF using MLE for lambda
plot(f(x),x,'-r',z,x,'b.',[1:100],cdf_mle,'-g')
% legend('fitted curve','data')
legend('','Exponential fit','LOS','MLE')
set(findall(gcf,'type','line'),'LineWidth',1)
set(gca,'fontweight','bold','FontSize',12)
xlabel('Inter cluster delay (ns)','fontweight','bold','fontsize',12)
ylabel ('Probability','fontweight','bold','fontsize',12)