Create a custom 2D gauss, which can be used for filtering, weighting, etc. All parameters are customizable, including standard deviations (sigmaX, sigmaY), rotation (theta), result size, center, etc.
Nice job Thomas, though it seems like you've switched sigmax and sigmay - comments?
Duane Hanselman: The nested loops are not necessary - use [rows,cols] = meshgrid(1:gsize(1),1:gsize(2)); and modify the remaining code to avoid them...