Closed tndoan closed 8 years ago
There are some errors in logGauss.m
logGauss.m
X = [1 2 4.0]; mu = 1; sigma=2 logGauss(X, mu, sigma)
The result is
-1.2655 -1.5155 -3.5155
while using the build-in function normpdf provides a different result
normpdf
normpdf(X, mu, sigma) ans = 0.1760 0.1995 0.1210
logGauss requires variance, where normpdf requies standard deviation. Therefore you should compare exp(logGauss(X,mu,sigma^2)) with normpdf(X,mu,sigma)
There are some errors in
logGauss.m
The result is
while using the build-in function
normpdf
provides a different result