From: Samoline1 Linke on
Hi,

I have two matrices 'A' and 'B', where A having values ranging from -1 to +1 and B having values ranging from +0.2 to +1.

When I try to represent the values of A and B by colors through the command '' imagesc(A)'' and ''imagesc(B)'' then a I get a nice colored box for each matrix showing different colors with respect to the values behind each color e.g. higher values are represented by different shades of dark red and lower values are represented by shades of dark blue. It is very nice but there is one problem.
When one has a quick look at the color boxes then one can get confused because although for matrix B all the values are positive but still the lower values are represented by different shades of blue color and in case of A the lower values are in negative and also are represented by blue colors. Is it possible that I set ranges of colors e.g. +0.2 to +0.4 values will always be represented by green color not matter what highest or lowest range is? Therefore, I will be able to set the standard that the negative values are represented by shades of blue etc. Could you please give me an example of how to do this keeping A as matrix having values from -1 to +1.
From: ImageAnalyst on
http://www.mathworks.com/matlabcentral/fileexchange/7943
http://www.mathworks.com/support/tech-notes/1200/1215.html