Watch this Author's files
The second function should be changed into this:
function val = rotgauss(y, x, theta, sigmax, sigmay, offset, factor, center)
x and y is flipped in the original code
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...
Great, very flexible, just what we want to have. THX