Colour matrix depending on the value
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all,
Thanks in advanced.
I have a matrix of 9x9 which those interesting values goes from a min to a max value. These values can vary depending on the input. There are useless data setup with value 0.
I want to colour each position depending on the value. My matrix is called 'subnetA'. I got these values min=1.2589e-08, max=1.0000e-07 and mean=5.6295e-08
I want:
- To setup my colormap range between 1.2589e-08 and 1.0000e-07)
- Colour in black those 0 values
- Colour in Red those values between 1.2589e-08 and 5.6295e-08
- Colour in Green those values between 5.6295e-08 and 1.0000e-07)
- Colour in Orange the mean value.
My script scans the matrix with the indexes i and j. 'i' are rows and 'j' columns. Then, subnet(i,j) will indicate a given position. I show the matrix with imagesc.
I hope it is clear.
Thanks again.
Raúl.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Colormaps 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!