In (at least) two places sime-colon line termination are missing. See diff below. Reproducible: Always Steps to Reproduce: 1. ocatve 2. chi2rnd(1, 1, 3); 3. Actual Results: octave:1> chi2rnd(1,1,3); rnd = 0.027498 0.010680 0.785842 octave:2> Expected Results: octave:1> chi2rnd(1,1,3); octave:2> *** chi2rnd.m~ 2008-05-21 21:23:29.000000000 +0200 --- chi2rnd.m 2008-05-31 09:27:37.000000000 +0200 *************** *** 68,74 **** if (find (!(n > 0) | !(n < Inf))) rnd = NaN * ones (sz); else ! rnd = 2 * randg(n/2, sz) endif else [retval, n, dummy] = common_size (n, ones (sz)); --- 68,74 ---- if (find (!(n > 0) | !(n < Inf))) rnd = NaN * ones (sz); else ! rnd = 2 * randg(n/2, sz); endif else [retval, n, dummy] = common_size (n, ones (sz)); *************** *** 84,90 **** k = find ((n > 0) & (n < Inf)); if (any (k)) ! rnd(k) = 2 * randg(n(k)/2, size(k)) endif endif --- 84,90 ---- k = find ((n > 0) & (n < Inf)); if (any (k)) ! rnd(k) = 2 * randg(n(k)/2, size(k)); endif endif
What package is this bug report about?
This relates to sci-mathematics/octave-3.0.1 and I notice an unfortunate spelling error in the function name, it should be chi2rnd (in the file /usr/share/octave/3.0.1/m/statistics/distributions/chi2rnd.m)
Hi Sven, Thanks much for the note and I've added a patch to fix this to the overlay. Please also file a bug upstream so the devs can fix this in the next release. Best, Markus