Kolmogorov-Smirnov statistic from two samples
[d,p] = kstwo(x,y)
samples (column vectors)
Kolmogorov-Smirnov statistic d
significance level p for the null hypothesis that the data sets x and y are drawn from the same distribution.
Kolmogorov-Smirnov statistic from two samples
Adapted from Press, Teukolsky, Vetterling and Flannery, Numerical Recipes in Fortran p619.