⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pois_cdf.m

📁 计量工具箱
💻 M
字号:
function f = pois_cdf(x,lambda)
% PURPOSE: computes the cumulative distribution function at x
% of the Poisson distribution with mean lambda
%---------------------------------------------------
% USAGE:     cdf = pois_cdf(x,lambda)
% where:     x   = variable vector (nx1)
%         lambda = mean 
%
%---------------------------------------------------
% Reference: Johnson & Kotz, Discrete Distributions, p 114

% Gordon K Smyth
% gks@maths.uq.edu.au
% Department of Mathematics, Unversity of Queensland, Q 4072, Australia
% http://www.maths.uq.edu.au/~gks/

% modified by J.P. LeSage 1/98

if nargin ~= 2
error('Wrong # of arguments to pois_cdf');
end;

if lambda <= 0
   error('Poisson mean must be positive.')
elseif x < 0
   f = 0;
else
   f = 1 - gammainc( floor(x+1), lambda );
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -