gaussian_2d, a MATLAB code which evaluates a general Gaussian function of a 2D argument.

A formula for the Gaussian function at the point (x,y) is:

      g(c,x,y,xmu,ymu,xsigma,ysigma,A) = c * exp ( 1/2 xy' * A * xy )
where xy is the vector
      [ ( x - xmu ) / sigma,
        ( y - ymu ) / sigma ]
and A is a positive definite symmetric matrix.


The computer code and data files made available on this web page are distributed under the GNU LGPL license.


gaussian_2d is available in a MATLAB version.

Related Data and Programs:

gaussian, a MATLAB code which evaluates the Gaussian function and its derivatives.


Source Code:

Last modified on 18 February 2021.