Commit f37094b2 authored by Frédéric Karamé's avatar Frédéric Karamé

Minor modifications in the inputs of the function.

parent 18059c01
......@@ -43,9 +43,6 @@ prior = probability2(st_t_1,sqr_Pss_t_t_1,particles) ;
% likelihood
yt_t_1_i = measurement_equations(particles,ReducedForm,ThreadsOptions) ;
eta_t_i = bsxfun(@minus,obs,yt_t_1_i)' ;
%yt_t_1 = sum(yt_t_1_i*weigths1,2) ;
%tmp = bsxfun(@minus,yt_t_1_i,yt_t_1) ;
%Pyy = bsxfun(@times,weigths2',tmp)*tmp' + H ;
Pyy = H ;
sqr_det = sqrt(det(Pyy)) ;
foo = (eta_t_i/Pyy).*eta_t_i ;
......
......@@ -34,5 +34,4 @@ function [density] = probability2(mu,S,X)
dim = size(X,1) ;
normfact = bsxfun(@power,(2*pi),(dim/2)) ;
foo = S\(bsxfun(@minus,X,mu)) ;
density = exp(-0.5*sum(foo.*foo)')./abs((normfact*prod(diag(S)))) + 1e-99 ;
density = exp(-0.5*sum(foo.*foo)')./abs((normfact*prod(diag(S)))) + 1e-99 ;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment