How to plot heat map using MATLAB?

I have matrix with dimensions [4096, 181], I want to draw a heatmap for such matrix as in the following figure. How can i do so?

 Respuesta aceptada

Chunru
Chunru el 12 de Ag. de 2021
Editada: Chunru el 12 de Ag. de 2021
a = peaks(40);
imagesc(a)
colormap(hsv(512))
colorbar

4 comentarios

Abdelwahab Afifi
Abdelwahab Afifi el 12 de Ag. de 2021
Editada: Abdelwahab Afifi el 12 de Ag. de 2021
Is it possible to adjust the colorbar to include the red colour?
Chunru
Chunru el 12 de Ag. de 2021
use colormap as shown above
Abdelwahab Afifi
Abdelwahab Afifi el 12 de Ag. de 2021
I noticed that there is a red colour at the top and bottom of the colour map. this causes confusion. is it possible to limit the colour map exactly as in the pic I attached?
I got it
colormap turbo
colorbar

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Color and Styling en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Etiquetas

Preguntada:

el 12 de Ag. de 2021

Comentada:

el 12 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by