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

📄 binomp.m

📁 统计分析的软件包
💻 M
字号:
function f = binomp(x,n,p);
%BINOMP	BINOMP(X,N,P) is the cumulative distribution function at X of the
%	binomial distribution with denominator N and success probability P.
%	X, N and P must be scalars.

% GKS 13 Aug 95, 6 Aug 98

if n <= 0
   error('Binomial denominator must be positive.')
elseif (p < 0) | (p > 1)
   error('Binomial probability must be >= 0 and <= 1.')
elseif x >= n
   f = 1;
elseif x < 0
   f = 0;
else
   x = floor(x);
   f = betainc( 1-p, n-x, x+1 );
end

⌨️ 快捷键说明

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