MATLAB Answers


why imagesc display the matrix in black and white?

Asked by Kobi
on 8 Jul 2014
Latest activity Commented on by Image Analyst
on 9 Jul 2014
during a calculation of a complex matrix inside exp function i recived the following resault as seen in the attached image below the values are the real part of the matrix in both figures and they both go between 0 to 1 why the figure on the right is in black and white?


Sign in to comment.

1 Answer

Answer by Image Analyst
on 8 Jul 2014

You have not applied a colormap to that image on the right. The one on the left has a colormap applied to it.


colormap works great but why did it turn into gray?
You did not show your code, so I don't know. By default imagesc() applies the jet (I believe) colormap. I find application of some arbitrary colormap that may not be appropriate annoying. I would guess that in your code you called colormap(gray);

Sign in to comment.