# HG changeset patch # User Rik # Date 1306943588 25200 # Node ID 5bf8af73fc34246b8f364f6dbf553974bb7d5658 # Parent c9e1a2f8d7f8fb8a3f118b74e29256e03684d9be wblpdf.m: Bug fix to include x=0 in calculated distribution. * wblpdf.m: Bug fix to include x=0 in calculated distribution. diff -r c9e1a2f8d7f8 -r 5bf8af73fc34 scripts/statistics/distributions/wblpdf.m --- a/scripts/statistics/distributions/wblpdf.m Tue May 31 22:52:18 2011 -0700 +++ b/scripts/statistics/distributions/wblpdf.m Wed Jun 01 08:53:08 2011 -0700 @@ -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)