[CHANGESET]: Statistics function incorrectly computing median

Bateman David-ADB014 David.Bateman at motorola.com
Thu Mar 6 08:13:21 CST 2008


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), "lienar", "extrap");

or maybe even just as

inv = interp1 (cdf, x, p, "linear", "extrap");

as the permutation of the values of p by k before interpolation is undone by the permutation in the assignment.

D.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080306/7b41c6ca/attachment.html 


More information about the Bug-octave mailing list