function [value] = incomplete_gamma ( vt, np)
% This function implements Eq. (2.67) to compute the Incomplete Gamma function
% This function needs "factor.m" to run
format long
eps = 1.000000001;
% Test to see if np = 1
if (np == 1)
value1 = vt * exp(-vt);
value = 1.0 - exp(-vt);
return
end
sumold = 1.0;
sumnew =1.0;
calc1 = 1.0;
calc2 = np;
xx = np * log(vt+0.0000000001) - vt - factor(calc2);
temp1 = exp(xx);
temp2 = np / (vt+0.0000000001);
diff = .0;
ratio = 1000.0;
if (vt >= np)
while (ratio >= eps)
diff = diff + 1.0;
calc1 = calc1 * (calc2 - diff) / vt ;
sumnew = sumold + calc1;
ratio = sumnew / sumold;
sumold = sumnew;
end
value = 1.0 - temp1 * sumnew * temp2;
return
else
diff = 0.;
sumold = 1.;
ratio = 1000.;
calc1 = 1.;
while(ratio >= eps)
diff = diff + 1.0;
calc1 = calc1 * vt / (calc2 + diff);
sumnew = sumold + calc1;
ratio = sumnew / sumold;
sumold = sumnew;
end
value = temp1 * sumnew;
end
Swerling 1.rar_Swerling目标_fluctuating target_roc curves_swerling
版权申诉
138 浏览量
2022-07-15
12:01:59
上传
评论
收藏 2KB RAR 举报
我虽横行却不霸道
- 粉丝: 72
- 资源: 1万+
最新资源
- pta题库答案c语言之排序4统计工龄.zip
- pta题库答案c语言之树结构7堆中的路径.zip
- pta题库答案c语言之树结构3TreeTraversalsAgain.zip
- pta题库答案c语言之树结构2ListLeaves.zip
- pta题库答案c语言之树结构1树的同构.zip
- 基于C++实现民航飞行与地图简易管理系统可执行程序+说明+详细注释.zip
- pta题库答案c语言之复杂度1最大子列和问题.zip
- 三维装箱问题(Three-Dimensional Bin Packing Problem,3D-BPP)是一个经典的组合优化问题
- 以下是一些关于Linux线程同步的基本概念和方法.txt
- 以下是一个简化的示例,它使用pygame库来模拟烟花动画的框架.txt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0