changeset 12694:e09860581a7c stable

unifpdf.m: Bug fix to include limits of range [A,B] in distribution. * unifpdf.m: Bug fix to include limits of range [A,B] in distribution.
author Rik <octave@nomad.inbox5.com>
date Tue, 31 May 2011 11:50:38 -0700
parents abc71e3148ac
children c9e1a2f8d7f8
files scripts/statistics/distributions/unifpdf.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/statistics/distributions/unifpdf.m	Thu May 26 12:40:13 2011 -0700
+++ b/scripts/statistics/distributions/unifpdf.m	Tue May 31 11:50:38 2011 -0700
@@ -53,7 +53,7 @@
     pdf(k) = NaN;
   endif
 
-  k = find ((x > a) & (x < b));
+  k = find ((x >= a) & (x <= b));
   if (any (k))
     if (isscalar (a) && isscalar(b))
       pdf(k) = 1 ./ (b - a);