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

📄 ncchi2_2.m

📁 GPS TOOLBOX包含以下内容: 1、GPS相关常量和转换因子; 2、角度变换; 3、坐标系转换: &#61656 点变换; &#61656 矩阵变换; &#61656 向量变换
💻 M
字号:
%                             ncchi2_2.m
%  Scope:   This MATLAB macro computes the probability density function of the 
%           non-central chi-square distribution with two degrees of freedom.
%  Usage:   xoutput = ncchi2_2(x,lambda)
%  Description of parameters:
%           x       - input, scalar independent variable
%           lambda  - input, non-centrality parameter
%           xoutput - output, computed probability density function 
%  Remark:  This macro can be used for the computation of the integral of the
%           probability density function.
%  Last update:  04/12/00
%  Copyright (C) 1998 by LL Consulting. All Rights Reserved.

function  xoutput = ncchi2_2(x,lambda)

sum = 1;
temp = sum;

for k = 1:49
   termk = temp.*lambda.*x./(4.*k.*k);
   sum = sum + termk;
   temp = termk;
end

xoutput = 0.5.*sum.*exp(-0.5.*(x+lambda));

⌨️ 快捷键说明

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