chi2_dof.m
来自「功能极全的GPS开发工具箱」· M 代码 · 共 26 行
M
26 行
% chi2_dof.m
% Scope: This MATLAB macro computes the probability density function of the
% chi-square distribution with dof degrees of freedom.
% Usage: xoutput = chi2_dof(x,y)
% Description of parameters:
% x - input, scalar independent variable
% dof - input, scalar, degree of freedom, global variable
% xoutput - output, computed probability density function
% Remark:
% The computed function is equivalent to the state derivative of the
% chi-square distribution with dof degrees of freedom.
% Last update: 04/07/00
% Copyright (C) 1997-00 by LL Consulting. All Rights Reserved.
function xoutput = chi2_dof(x,y)
global dof
k2 = 0.5*dof;
gfnc = gamma(k2);
power2k = 2^k2;
xoutput = x^(k2 - 1) * exp(-0.5*x) / power2k / gfnc;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?