From: Mongkut Piantanakulchai on
Hi,

I have several matrix with numbers and would like to display and compare them using imagesc command.

Everytime I change the matrix the colormap change according to the range of value (maximum and minimum) of each matrix.

Is it possible to fix the color map range using some command line?

Thank you very much in advance,

Mongkut P.
From: Walter Roberson on
Mongkut Piantanakulchai wrote:

> I have several matrix with numbers and would like to display and compare
> them using imagesc command.
>
> Everytime I change the matrix the colormap change according to the range
> of value (maximum and minimum) of each matrix.
>
> Is it possible to fix the color map range using some command line?

Yup, it's right in the documentation:
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/imagesc.html

"imagesc(...,clims) normalizes the values in C to the range specified by
clims and displays C as an image. clims is a two-element vector that
limits the range of data values in C. These values map to the full range
of values in the current colormap."
From: Mongkut Piantanakulchai on
Thanks a lot.

Now I can specify the fixed color range using

imagesc(X,[minval,maxval]);

Mongkut P.