Mercurial > octave-antonio
diff scripts/statistics/distributions/cauchy_cdf.m @ 11587:c792872f8942
all script files: untabify and strip trailing whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:35:29 -0500 |
parents | fd0a3ac60b0e |
children | 89d41b6aa661 |
line wrap: on
line diff
--- a/scripts/statistics/distributions/cauchy_cdf.m Thu Jan 20 17:24:59 2011 -0500 +++ b/scripts/statistics/distributions/cauchy_cdf.m Thu Jan 20 17:35:29 2011 -0500 @@ -21,7 +21,7 @@ ## For each element of @var{x}, compute the cumulative distribution ## function (CDF) at @var{x} of the Cauchy distribution with location ## parameter @var{location} and scale parameter @var{scale}. Default -## values are @var{location} = 0, @var{scale} = 1. +## values are @var{location} = 0, @var{scale} = 1. ## @end deftypefn ## Author: KH <Kurt.Hornik@wu-wien.ac.at> @@ -38,7 +38,7 @@ scale = 1; endif - if (!isscalar (location) || !isscalar (scale)) + if (!isscalar (location) || !isscalar (scale)) [retval, x, location, scale] = common_size (x, location, scale); if (retval > 0) error ("cauchy_cdf: X, LOCATION and SCALE must be of common size or scalar"); @@ -51,7 +51,7 @@ k = find ((x > -Inf) & (x < Inf) & (location > -Inf) & (location < Inf) & (scale > 0) & (scale < Inf)); if (any (k)) - if (isscalar (location) && isscalar (scale)) + if (isscalar (location) && isscalar (scale)) cdf(k) = 0.5 + atan ((x(k) - location) ./ scale) / pi; else cdf(k) = 0.5 + atan ((x(k) - location(k)) ./ scale(k)) / pi;