GAUSS2D Generate a 2-dimensional gaussian matrix

Usage: >> [ gaussmatrix ] = gauss2d( rows, columns, sigmaR, sigmaC, peakR, peakC, mask)

Example: >> imagesc(gauss2d(50, 50)); % image a size (50,50) 2-D gaussian matrix

Inputs:
rows   
number of rows in matrix
columns   
number of columns in matrix
sigmaR   
width of standard deviation in rows (default: rows/5)
sigmaC   
width of standard deviation in columns (default: columns/5)
peakR   
location of the peak in each row (default: rows/2)
peakC   
location of the peak in each column (default: columns/2)
mask   
(0->1) portion of the matrix to mask with zeros (default: 0)

Ouput:
gaussmatrix   
2-D gaussian matrix

Author: Arnaud Delorme, CNL / Salk Institute, 2001

See the matlab file gauss2d.m (may require other functions)

Back to functions