Covariance matrix of the ovarian cancer data

6 visualizaciones (últimos 30 días)
Sara Vasciaveo
Sara Vasciaveo el 19 de Mzo. de 2021
Respondida: Vashist Hegde el 22 de Mzo. de 2021
If I generate an imagen with imagesc for the Covariance matrix of the ovarian cancer data how do I mark the healthy and patient groups in my plot?
load ovariancancer
cov_all = cov(obs');
figure()
imagesc(cov_all)
colormap default
colorbar

Respuestas (1)

Vashist Hegde
Vashist Hegde el 22 de Mzo. de 2021
DISCLAIMER: These are my own views and in no way depict those of MathWorks.
You can do this by adding the color limit property.
Example:
C = [0 2 4 6; 8 10 12 14; 16 18 20 22];
clims = [cmin cmax];
imagesc(C,clims)
colorbar
Here, any value below cmin will have the color assigned to cmin and any value ablove cmax will have the color assigned to cmax.
For more information on imagesc, here is the documentation page: imagesc
Hope this helps.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by