This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# GaussianMatrix

 GaussianMatrix[r]gives a matrix that corresponds to a Gaussian kernel of radius r. GaussianMatrix gives a matrix corresponding to a Gaussian kernel with radius r and standard deviation . GaussianMatrixgives a matrix formed from the derivative of the Gaussian with respect to rows and the derivative with respect to columns. GaussianMatrixgives a matrix formed from the sums of the and derivatives. GaussianMatrix gives an array corresponding to a Gaussian kernel with radius in the i index direction.
• GaussianMatrix[r] gives values that approximate at index positions from the center, where .
• GaussianMatrix by default constructs discrete derivatives as finite differences.
• GaussianMatrix gives a matrix formed from the Laplacian of a Gaussian.
• GaussianMatrix[{Automatic, , f}, ...] constructs a matrix just large enough to include at least a fraction f of the discrete integral of a Gaussian in each direction.
• GaussianMatrix allows any of r, , and f to be lists, specifying different values for different directions.
• For non-integer r, the value of r is effectively rounded to an integer.
 Method "Bessel" how to determine matrix elements WorkingPrecision Automatic the precision with which to compute matrix elements "Standardization" True whether to rescale and shift the matrix to account for truncation
• Possible settings for the Method option are and .
• With the default option setting Method, GaussianMatrix[r] has elements proportional to Exp[-2] BesselI[x, 2], yielding a kernel with optimal discrete convolution properties.
• For Method, derivatives of GaussianMatrix[r] are obtained by the finite difference operator. GaussianMatrix satisfies the finite difference equation .
• For Method, derivatives of GaussianMatrix[r] are proportional to the partial derivatives of the functional form. The GaussianMatrix approximately satisfies the differential equation .
• With , the elements of GaussianMatrix[r] will sum to 1. However, the elements of GaussianMatrix with at least one nonzero will sum to 0, and the sum of the elements, weighted in each direction by times the distance from the origin to the power of , will be 1.
Compute and plot a Gaussian matrix:
Compute and plot a Gaussian vector:
First derivative of a Gaussian matrix in the vertical dimension:
Compute and plot a Gaussian matrix:
 Out[1]=

Compute and plot a Gaussian vector:
 Out[1]=

First derivative of a Gaussian matrix in the vertical dimension:
 Out[1]=
 Scope   (2)
With Method, the derivative is computed using a finite difference:
With Method, the continuous derivative is used:
Generate an exact symbolic Gaussian matrix:
 Options   (8)
A Gaussian matrix appropriate for discrete convolution:
A Gaussian matrix sampled from the continuum:
A machine-precision Gaussian vector:
An exact symbolic Gaussian vector:
A high-precision Gaussian vector:
A normalized Gaussian vector:
A normalized Gaussian matrix:
An unnormalized Gaussian vector:
The total of the unnormalized matrix approaches 1 as the ratio of its size to its standard deviation increases:
A shifted Gaussian derivative:
A shifted Gaussian derivative is also rescaled:
A Gaussian derivative that is not standardized:
Shifts and rescalings are performed using a discrete normalization for all methods: