Plot weighted sparsity pattern

조회 수: 6 (최근 30일)
Ji Hyun Ko
Ji Hyun Ko 2012년 7월 16일
Hi,
I am trying to visualize a weighted (i.e., color-coded) sparsity pattern. I tried "spy" but it only shows '1' and '0', and I want to show the weighted (color coded with spectra) dots.
For example, I created the adjacency matrix (for graph theory) using Pearson's correlation thresholded at p<0.01. However, I want to show the rho's in some thing like spy...
Please help!
Best,
Ji Hyun

채택된 답변

bym
bym 2012년 7월 16일
편집: bym 2012년 7월 16일
See if this gets you close
x = rand(100);
y = zeros(100);
y(x<.025) = x(x<.025);
cmap = [1 1 1;jet];
imagesc(y)
colormap(cmap)
  댓글 수: 1
Ji Hyun Ko
Ji Hyun Ko 2012년 7월 17일
It works perfect! Thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by