function plotecdf(x)
% plots empiricial cdf for the data in vector x
x=sort(x); n=length(x);
y=(1:n)/n;
stairs(x,y)