Mercurial > hg > octave-nkf
changeset 12751:c8f451df37a7
maint: Periodic merge of stable to default.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sat, 18 Jun 2011 07:37:20 -0700 |
parents | bb55443911ff (current diff) 89d41b6aa661 (diff) |
children | 34cd2fcfdcb8 |
files | |
diffstat | 3 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/statistics/distributions/cauchy_cdf.m +++ b/scripts/statistics/distributions/cauchy_cdf.m @@ -48,8 +48,8 @@ sz = size (x); cdf = NaN (sz); - k = find ((x > -Inf) & (x < Inf) & (location > -Inf) & - (location < Inf) & (scale > 0) & (scale < Inf)); + k = find ((location > -Inf) & (location < Inf) + & (scale > 0) & (scale < Inf)); if (any (k)) if (isscalar (location) && isscalar (scale)) cdf(k) = 0.5 + atan ((x(k) - location) ./ scale) / pi;
--- a/scripts/statistics/distributions/normcdf.m +++ b/scripts/statistics/distributions/normcdf.m @@ -50,18 +50,18 @@ cdf = zeros (sz); if (isscalar (m) && isscalar(s)) - if (find (isinf (m) | isnan (m) | !(s >= 0) | !(s < Inf))) + if (find (isinf (m) | isnan (m) | !(s > 0) | !(s < Inf))) cdf = NaN (sz); else cdf = stdnormal_cdf ((x - m) ./ s); endif else - k = find (isinf (m) | isnan (m) | !(s >= 0) | !(s < Inf)); + k = find (isinf (m) | isnan (m) | !(s > 0) | !(s < Inf)); if (any (k)) cdf(k) = NaN; endif - k = find (!isinf (m) & !isnan (m) & (s >= 0) & (s < Inf)); + k = find (!isinf (m) & !isnan (m) & (s > 0) & (s < Inf)); if (any (k)) cdf(k) = stdnormal_cdf ((x(k) - m(k)) ./ s(k)); endif
--- a/scripts/statistics/distributions/normpdf.m +++ b/scripts/statistics/distributions/normpdf.m @@ -50,18 +50,18 @@ pdf = zeros (sz); if (isscalar (m) && isscalar (s)) - if (find (isinf (m) | isnan (m) | !(s >= 0) | !(s < Inf))) + if (find (isinf (m) | isnan (m) | !(s > 0) | !(s < Inf))) pdf = NaN (sz); else pdf = stdnormal_pdf ((x - m) ./ s) ./ s; endif else - k = find (isinf (m) | isnan (m) | !(s >= 0) | !(s < Inf)); + k = find (isinf (m) | isnan (m) | !(s > 0) | !(s < Inf)); if (any (k)) pdf(k) = NaN; endif - k = find (!isinf (m) & !isnan (m) & (s >= 0) & (s < Inf)); + k = find (!isinf (m) & !isnan (m) & (s > 0) & (s < Inf)); if (any (k)) pdf(k) = stdnormal_pdf ((x(k) - m(k)) ./ s(k)) ./ s(k); endif