function cy=cdf(x,y)

% CDF         Cumulative Density Function.
%
%             Example: load kddata
%                      [x,y]=kdfft1(suicide,'knorm',128,40);
%                      pause;
%                      cy=cdf(x,y);
%                      plot(x,cy) 
% 
%             Christian C. Beardah 1997

h=x(2)-x(1);

y=h*y;
cy=cumsum(y);