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

180 visualizzazioni (ultimi 30 giorni)
like for a 16x16 matrix:

Risposta accettata

bym
bym il 27 Mag 2012
imagesc(your_matrix)
  2 Commenti
Image Analyst
Image Analyst il 27 Mag 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.

Accedi per commentare.

Più risposte (1)

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

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by