フィルターのクリア

Exclude some values from the heatmap

8 ビュー (過去 30 日間)
Julia Moore
Julia Moore 2020 年 7 月 13 日
回答済み: KSSV 2020 年 7 月 13 日
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 件のコメント
Alan Stevens
Alan Stevens 2020 年 7 月 13 日
Have you tried setting those values to NaN?

サインインしてコメントする。

回答 (1 件)

KSSV
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 ;

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by