필터 지우기
필터 지우기

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 CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by