fixed bug in analytic derivatives of normal pdf for vector inputs.

time-shift
Marco Ratto 2012-06-08 08:50:48 +02:00
parent 7f9d2968d9
commit 2de336c94c
1 changed files with 2 additions and 2 deletions

View File

@ -35,9 +35,9 @@ if nargin<2, a=0; end
ldens = -log(b) -.5*log(2*pi) - .5*((x-a)./b).*((x-a)./b) ;
if nargout >1
Dldens = - (1/b)*((x-a)/b) ;
Dldens = - (1./b).*((x-a)./b) ;
end
if nargout == 3
D2ldens = - (1/b)^2 ;
D2ldens = - (1./b).^2 ;
end