*** ./scripts/statistics/distributions/poisson_rnd.m.orig3 2004-04-09 12:11:07.000000000 +0200 --- ./scripts/statistics/distributions/poisson_rnd.m 2004-09-10 13:52:03.000000000 +0200 *************** *** 101,107 **** ind = find (sum < 1); if (any (ind)) sum(ind) = (sum(ind) ! - log (1 - rand (1, length (ind))) ./ l(ind)); num(ind) = num(ind) + 1; else break; --- 101,107 ---- ind = find (sum < 1); if (any (ind)) sum(ind) = (sum(ind) ! - log (1 - rand (length (ind), 1)) ./ l(ind)); num(ind) = num(ind) + 1; else break; *** ./scripts/statistics/distributions/binomial_rnd.m.orig3 2004-04-17 00:21:10.000000000 +0200 --- ./scripts/statistics/distributions/binomial_rnd.m 2004-09-10 13:46:46.000000000 +0200 *************** *** 82,88 **** else nel = prod (sz); tmp = rand (n, nel); ! rnd = tmp < ones (n, nel) * p; rnd = reshape(rnd, sz); endif else --- 82,88 ---- else nel = prod (sz); tmp = rand (n, nel); ! rnd = sum(tmp < ones (n, nel) * p, 1); rnd = reshape(rnd, sz); endif else *************** *** 101,107 **** tmp = rand (N, L); ind = (1 : N)' * ones (1, L); rnd(k) = sum ((tmp < ones (N, 1) * p(k)(:)') & ! (ind <= ones (N, 1) * n(k)(:)')); endif endif --- 101,107 ---- tmp = rand (N, L); ind = (1 : N)' * ones (1, L); rnd(k) = sum ((tmp < ones (N, 1) * p(k)(:)') & ! (ind <= ones (N, 1) * n(k)(:)'),1); endif endif