Mercurial > octave-nkf
changeset 12657:234e2c4aaec8 stable
gampdf.m: Bug fix to extend function range to include x==0.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Mon, 09 May 2011 17:59:44 -0700 |
parents | 20e64dab6896 |
children | 08f8fc1e9872 |
files | scripts/statistics/distributions/gampdf.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/statistics/distributions/gampdf.m Fri May 06 16:38:15 2011 -0700 +++ b/scripts/statistics/distributions/gampdf.m Mon May 09 17:59:44 2011 -0700 @@ -48,7 +48,7 @@ pdf (k) = NaN; endif - k = find ((x > 0) & (a > 0) & (a <= 1) & (b > 0)); + k = find ((x >= 0) & (a > 0) & (a <= 1) & (b > 0)); if (any (k)) if (isscalar(a) && isscalar(b)) pdf(k) = (x(k) .^ (a - 1)) ... @@ -59,7 +59,7 @@ endif endif - k = find ((x > 0) & (a > 1) & (b > 0)); + k = find ((x >= 0) & (a > 1) & (b > 0)); if (any (k)) if (isscalar(a) && isscalar(b)) pdf(k) = exp (- a .* log (b) + (a-1) .* log (x(k))