Plot weighted sparsity pattern

6 vues (au cours des 30 derniers jours)
Ji Hyun Ko
Ji Hyun Ko le 16 Juil 2012
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

Réponse acceptée

bym
bym le 16 Juil 2012
Modifié(e) : bym le 16 Juil 2012
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 commentaire
Ji Hyun Ko
Ji Hyun Ko le 17 Juil 2012
It works perfect! Thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Sparse Matrices 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