LPDFNORM The log of the normal density function f = lpdfnorm(x,Mean,StandardDeviation)
0001 function f = lpdfnorm(x,m,s) 0002 %LPDFNORM The log of the normal density function 0003 % 0004 % f = lpdfnorm(x,Mean,StandardDeviation) 0005 0006 if nargin<3, s=1; end 0007 if nargin<2, m=0; end 0008 f = -log(s)-log(2*pi)/2-((x-m)./s).^2/2; 0009