chi_square_mass.m

来自「This a collection of MATLAB functions fo」· M 代码 · 共 12 行

M
12
字号
function f=chi_square_mass(x,n)
%function F = chi_square_mass(x,n)
% INPUTS: x - x-axis coordinates, n - degrees of freedom
% OUTPUT: F(x) - Chi-square probability mass function
%
% Reference: Press, "Numerical Recipes in C", 2nd Ed., 1992, page 221.
%
% Tim Bailey 2005.

if any(x<0), error('x must be non-negative.'), end
f = gammainc(x/2, n/2) ;

⌨️ 快捷键说明

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