imshow command for Gaussian function I'm trying to plot 2D gaussian function using "imshow" in MATLAB. However I could not see any white points in image. I tried to change sampling values and limits of x and y values. In addition to this, I tried z.^2 and higher orders but nothing changed.Thank you for any help.What can be the problem? My code is below:

sigma = 10;
[X,Y] = meshgrid(-40:0.5:40,-40:0.5:40);
z     = (1/(2*pi*(sigma^2)))*exp(-((X.^2)+(Y.^2))/(2*(sigma^2)));
figure
surf(X,Y,z);%shading interp
figure
imshow(z);
Why not to simply use either:

imagesc(z);


Or:

h=pcolor(z)
set(h, 'LineStyle','None')


Although if you really want to use imshow then provide a set of extra parameters to scale the plotting range. It's more computational and memory efficient. 

imshow(z, [min(min(z)) max(max(z))])