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

253 visualizaciones (últimos 30 días)
A
A el 27 de Mayo de 2012
Respondida: Ahmed Osman el 29 de Dic. de 2017
like for a 16x16 matrix:

Respuesta aceptada

bym
bym el 27 de Mayo de 2012
imagesc(your_matrix)
  2 comentarios
Image Analyst
Image Analyst el 27 de Mayo de 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.
Xingyun Zhou
Xingyun Zhou el 22 de Nov. de 2016
Pretty Helpful!Thanks!

Iniciar sesión para comentar.

Más respuestas (1)

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

Categorías

Más información sobre Blue en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by