comparison scripts/statistics/distributions/poisscdf.m @ 5411:bee21f388110

[project @ 2005-07-13 17:53:44 by jwe]
author jwe
date Wed, 13 Jul 2005 17:53:49 +0000
parents 56e066f5efc1
children 2a16423e4aa0
comparison
equal deleted inserted replaced
5410:56e066f5efc1 5411:bee21f388110
16 ## along with Octave; see the file COPYING. If not, write to the Free 16 ## along with Octave; see the file COPYING. If not, write to the Free
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 ## 02110-1301, USA. 18 ## 02110-1301, USA.
19 19
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {} poisson_cdf (@var{x}, @var{lambda}) 21 ## @deftypefn {Function File} {} poisscdf (@var{x}, @var{lambda})
22 ## For each element of @var{x}, compute the cumulative distribution 22 ## For each element of @var{x}, compute the cumulative distribution
23 ## function (CDF) at @var{x} of the Poisson distribution with parameter 23 ## function (CDF) at @var{x} of the Poisson distribution with parameter
24 ## lambda. 24 ## lambda.
25 ## @end deftypefn 25 ## @end deftypefn
26 26
27 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> 27 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at>
28 ## Description: CDF of the Poisson distribution 28 ## Description: CDF of the Poisson distribution
29 29
30 function cdf = poisson_cdf (x, l) 30 function cdf = poisscdf (x, l)
31 31
32 if (nargin != 2) 32 if (nargin != 2)
33 usage ("poisson_cdf (x, lambda)"); 33 usage ("poisscdf (x, lambda)");
34 endif 34 endif
35 35
36 if (!isscalar (l)) 36 if (!isscalar (l))
37 [retval, x, l] = common_size (x, l); 37 [retval, x, l] = common_size (x, l);
38 if (retval > 0) 38 if (retval > 0)
39 error ("poisson_cdf: x and lambda must be of common size or scalar"); 39 error ("poisscdf: x and lambda must be of common size or scalar");
40 endif 40 endif
41 endif 41 endif
42 42
43 cdf = zeros (size (x)); 43 cdf = zeros (size (x));
44 44