em_invgausscdf.m

来自「EM分群,matlab程式碼,用來分群用的」· M 代码 · 共 24 行

M
24
字号
function y = EM_invgausscdf(x,par)
%INVGAUSSPDF Inverse Gaussian cumulative distribution function.
%   Y = INVGAUSSPDF(X,MU,LAM) returns the cumulative of the inverse gaussian function 
%   with parameters MU and LAM, at the values in X.
%
%   The size of Y is the size of the X argument. (GENERALIZE)
%

%   References (CHECK OUT):
%      [1]  .....
% 
%   Created by Enrico Rossoni - 17/06/2004
mu = par(1);
lam = par(2);


% Initialize Y to zero.
y = zeros(size(x));

x1 = sqrt(lam./x);
x2 = x./mu;

y = normcdf(x1.*(x2-1), 0,1) + exp(2*lam./mu).* normcdf(-x1.*(x2+1), 0,1);

⌨️ 快捷键说明

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