hmmgausf.m

来自「Mathematical Methods by Moor n Stiling.」· M 代码 · 共 23 行

M
23
字号
function f = hmmgausf(y,f,s)
% 
% Compute the pmf value for a Gaussian distribution
%
% function f = hmmgausf(y,f,s)
%
% y = output value
% f = output distribution
% s = state

% Copyright 1999 by Todd K. Moon

m = length(y); 

% For many distributions, there may be numeric problems with the
% computation, so the pseudo inverse is used in an attempt to stabilize it. 
% There are frequently still problems!

%f =1/((2*pi)^(m/2)*sqrt(abs(det(f{3,s}))))*exp(-.5*(y-f{2,s})'*pinv(f{3,s})...
%        * (y-f{2,s}));

f = sqrt(abs(det(pinv(f{3,s}))))/((2*pi)^(m/2))...
    *exp(-.5*(y-f{2,s})'*pinv(f{3,s}) * (y-f{2,s}));

⌨️ 快捷键说明

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