Mercurial > hg > octave-lyh
changeset 12696:5bf8af73fc34 stable
wblpdf.m: Bug fix to include x=0 in calculated distribution.
* wblpdf.m: Bug fix to include x=0 in calculated distribution.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 01 Jun 2011 08:53:08 -0700 |
parents | c9e1a2f8d7f8 |
children | ee4775d04d7f |
files | scripts/statistics/distributions/wblpdf.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/statistics/distributions/wblpdf.m +++ b/scripts/statistics/distributions/wblpdf.m @@ -62,12 +62,12 @@ pdf = NaN (size (x)); ok = ((scale > 0) & (scale < Inf) & (shape > 0) & (shape < Inf)); - k = find ((x > -Inf) & (x <= 0) & ok); + k = find ((x > -Inf) & (x < 0) & ok); if (any (k)) pdf(k) = 0; endif - k = find ((x > 0) & (x < Inf) & ok); + k = find ((x >= 0) & (x < Inf) & ok); if (any (k)) if (isscalar (scale) && isscalar (shape)) pdf(k) = (shape .* (scale .^ -shape)