function nmshow(a)
%
% nmshow: normalized imshow maps image gray levels into range [0,1]
% On input:
%     a: 2D image
% On output:
%     none
% Call:
%     nmshow(a)
%

[m,n] = size(a);
mina = min(min(a));
maxa = max(max(a));
spread = maxa-mina;
if spread ~= 0
  imshow((a-mina)/spread,64);
else
  imshow(zeros(m,n),64);
end
