Effacer les filtres
Effacer les filtres

Exclude some values from the heatmap

8 vues (au cours des 30 derniers jours)
Julia Moore
Julia Moore le 13 Juil 2020
Réponse apportée : KSSV le 13 Juil 2020
Hey guys!!!
I want to exclude the main diagonal values from the following heatmap, does anyone know how to take it?
ps. I especifically would like to let white the main diagonal, is it possible?
Thanks!!
  1 commentaire
Alan Stevens
Alan Stevens le 13 Juil 2020
Have you tried setting those values to NaN?

Connectez-vous pour commenter.

Réponses (1)

KSSV
KSSV le 13 Juil 2020
Let M be your matrix of size n*n. To replace diagonal values with NaN:
M = rand(11) ;
M(1:(n+1):end) = NaN ;

Catégories

En savoir plus sur Data Distribution Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by