Normal PDF
y=distfun_mvnpdf(x,mu,sigma)
a n-by-d matrix of doubles
a 1-by-d matrix of doubles, the mean
a d-by-d matrix of doubles, the covariance matrix
a n-by-1 matrix of doubles, the density
Computes the probability distribution function of the Multivariate Normal (Laplace-Gauss) function.
Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.
The function definition is:
x=[13.2,-33.7] mu=[12 -31] sigma = [ 3.0 0.5 0.5 1.0 ] y=distfun_mvnpdf(x,mu,sigma) // Plot the iso values of PDF // A wrapper for contouring function y=mvnpdfC(x1, x2, mu, sigma) x=[x1',x2'] y=distfun_mvnpdf(x,mu,sigma) endfunction x1=linspace(-6,18,100); x2=linspace(-35,-27,100); levels=[0.1 0.05 0.02 0.005 0.001]; contour(x1,x2,mvnpdfC,levels) legend(["Data","PDF"]); | ![]() | ![]() |
http://en.wikipedia.org/wiki/Multivariate_normal_distribution