📄 ncalpdf.m
字号:
function pdfi=NCalPdf(x, mui, smgi, U3i, U4i, U5i)
% calculate pdf at a specific value of MW
x1=(x-mui)/smgi;
ei=2.7183;
e1=ei^(-x1^2.0/2);
s1=1.0/sqrt(2*pi);
% cdf
b0=normcdf(x1,0,1);
% pdf
b1=s1*e1;
% 1th
b2=-x1*s1*e1;
% 2th
b3=(x1^2-1)*s1*e1;
% 3th
b4=(3*x1-x1^3)*s1*e1;
% 4th
b5=(3-6*x1^2+x1^4)*s1*e1;
% 5th
b6=(-15*x1+10*x1^3-x1^5)*s1*e1;
% 6th
b7=(-15+45*x1^2-15*x1^4+x1^6)*s1*e1;
% 7th
b8=(-x1^7+21*x1^5-105*x1^3+105*x1)*s1*e1;
% 8th
b9=(x1^8-28*x1^6+210*x1^4-420*x1^2+105)*s1*e1;
% 9th
b10=(-x1^9+36*x1^7-378*x1^5+1224*x1^3-945*x1)*s1*e1;
pdfi=b1-1/6*U3i/(smgi^3)*b4+1/24*(U4i/(smgi^4)-3)*b5+10/720*(U3i/(smgi^3))^2*b7-1/120*(U5i/smgi^5-10*U3i/smgi^3)*b6-35/5040*U3i/smgi^3*(U4i/smgi^4-3)*b8-280/362880*(U3i/smgi^3)^3*b9;
return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -