Mercurial > hg > octave-nkf
changeset 4689:a2d3862ed07a
[project @ 2004-01-08 20:49:06 by jwe]
author | jwe |
---|---|
date | Thu, 08 Jan 2004 20:49:06 +0000 |
parents | eaa2caaa35d6 |
children | b6dc2aad574a |
files | scripts/ChangeLog scripts/statistics/tests/kolmogorov_smirnov_test_2.m |
diffstat | 2 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,12 @@ +2004-01-08 John W. Eaton <jwe@bevo.che.wisc.edu> + + * statistics/tests/kolmogorov_smirnov_test_2.m: Fix test for ties. + +2004-01-07 John W. Eaton <jwe@bevo.che.wisc.edu> + + * miscellaneous/path.m: Handle DEFAULT_LOADPATH substitution. + Always return substituted version of LOADPATH if nargout != 0. + 2003-12-21 Schloegl Alois <alois.schloegl@tugraz.at> * miscellaneous/fullfile.m: If filename is empty, set it to "."
--- a/scripts/statistics/tests/kolmogorov_smirnov_test_2.m +++ b/scripts/statistics/tests/kolmogorov_smirnov_test_2.m @@ -73,11 +73,12 @@ count (find (i <= n_x)) = 1 / n_x; count (find (i > n_x)) = - 1 / n_y; - z = cumsum(count); - if ( find(diff(s))) + z = cumsum (count); + ds = diff (s); + if (any (ds == 0)) ## There are some ties, so keep only those changes. warning ("cannot compute correct p-values with ties") - elems = [find(diff(s)); n_x + n_y]; + elems = [find(ds); n_x+n_y]; z = z(elems); endif