Exclude some values from the heatmap
3 次查看(过去 30 天)
显示 更早的评论
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 个)
KSSV
2020-7-13
Let M be your matrix of size n*n. To replace diagonal values with NaN:
M = rand(11) ;
M(1:(n+1):end) = NaN ;
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!