MATLAB Answers

how to display elements of a 2D matrix as color-coded squares

668 views (last 30 days)
A
A on 27 May 2012
Answered: Ahmed Osman on 29 Dec 2017
like for a 16x16 matrix:

  0 Comments

Sign in to comment.

Accepted Answer

bym
bym on 27 May 2012
imagesc(your_matrix)

  2 Comments

Image Analyst
Image Analyst on 27 May 2012
Or use imshow() (if you have the Image Processing Toolbox) and apply a colormap (of which there are a wide variety of colormaps built in to MATLAB). But whatever you do, don't use pcolor() for this purpose.

Sign in to comment.

More Answers (1)

Ahmed Osman
Ahmed Osman on 29 Dec 2017
What if I want to plot it into a map with longitude and Latitude axes??

  0 Comments

Sign in to comment.

Tags