function afficheImg(M,color,scale)
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%display a 2D matrix
%%inputs:
%M: matrix to display
%color: colors to use, see http://www.mathworks.com/help/matlab/ref/colormap.html#inputarg_map
%scale: fixe the color scale, you have to put a vector [colorMininum color
%maximum] or 'auto' see http://www.mathworks.com/help/matlab/ref/caxis.html
%%exemple
%afficheImg([1 2 3;4 5 6;7 8 9],jet,[2 8])
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

imagesc(M)
caxis(scale)
axis image
colorbar
colormap(color)
