Mercurial > octave-nkf
diff scripts/statistics/distributions/gaminv.m @ 20644:4e307c55a2b5
Use isempty () rather than any () for faster code in inverse statistical distributions.
betainv.m, binoinv.m, gaminv.m, poissinv.m: Use '! isempty (k)' rather than
'any (k)' for faster code.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 11 Oct 2015 21:09:41 -0700 |
parents | c3c052b9192a |
children |
line wrap: on
line diff
--- a/scripts/statistics/distributions/gaminv.m Sun Oct 11 20:33:37 2015 -0700 +++ b/scripts/statistics/distributions/gaminv.m Sun Oct 11 21:09:41 2015 -0700 @@ -58,7 +58,7 @@ inv(k) = Inf; k = find ((x > 0) & (x < 1) & (a > 0) & (a < Inf) & (b > 0) & (b < Inf)); - if (any (k)) + if (! isempty (k)) if (! isscalar (a) || ! isscalar (b)) a = a(k); b = b(k);