
MAX=max(max(G));
G=20*log10((G+eps)/MAX);
Ig=find(G < dbmin);
G(Ig)=dbmin;
Ig=find(G > dbmax);
G(Ig)=dbmax;
xg=dbmax; ng=dbmin; cg=255/(xg-ng); image(cg*(G-ng));
% axis square
