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

248 vues (au cours des 30 derniers jours)
A
A le 27 Mai 2012
like for a 16x16 matrix:

Réponse acceptée

bym
bym le 27 Mai 2012
imagesc(your_matrix)
  2 commentaires
Image Analyst
Image Analyst le 27 Mai 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 le 22 Nov 2016
Pretty Helpful!Thanks!

Connectez-vous pour commenter.

Plus de réponses (1)

Ahmed Osman
Ahmed Osman le 29 Déc 2017
What if I want to plot it into a map with longitude and Latitude axes??

Catégories

En savoir plus sur Blue dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by