From bug-request at octave dot org Thu Oct 27 15:03:02 2005 Subject: Re: kruskal_wallis_test() does not handle ties correctly From: "John W. Eaton" To: Timo Juhani Lindfors Cc: Paul Kienzle , Timo Lindfors , bug@octave.org Date: Thu, 27 Oct 2005 15:58:52 -0400 On 27-Oct-2005, Timo Juhani Lindfors wrote: | Hi, | | On Sat, Oct 22, 2005 at 11:44:12AM -0400, Paul Kienzle wrote: | > octave:2> x = [1 1 1 2 2 3 3 3 3 4 5 6 7 8 8 8 8]; | > octave:3> diff([0 find(x(1:end-1) != x(2:end)) length(x)]) | > ans = | > | > 3 2 4 1 1 1 1 4 | > | > Perhaps octave should have the function runlength: | | > Then you can write: | > | > sumT = sum(polyval([1 0 -1 0],runlength(sp))); | | Whoa, that's a very compact way to rewrite the fix :) | | Anyways, I'm not very familiar with octave development, should I send | my fix as a patch somewhere Yes, please send an updated patch to the bug at octave dot org list. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------