[CHANGESET]: Statistics function incorrectly computing median
Ben Abbott
bpabbott at mac.com
Thu Mar 6 10:54:55 CST 2008
On Thursday, March 06, 2008, at 09:16AM, "Bateman David-ADB014" <David.Bateman at motorola.com> wrote:
>Why can't
>
> for q = 1:n
> inv(k(q)) = interp1 (cdf, x, p(k(q)), "linear", "extrap");
> endfor
>
>in __quantile__.m be written as
>
>inv(k) = interp1 (cdf, x, p(k), "linear", "extrap");
>
The original author of the discrete_inv used to loop over "q" in order to favor choose memory over time (__quantile__ evolved from discrete_inv).
Not knowing how much data might be encountered, I had left it as it was
However, that said, I'm in favor of changing it (memory is cheap and getting cheaper all the time).
Ben
More information about the Bug-octave
mailing list