Colour matrix depending on the value

1 次查看(过去 30 天)
Raúl
Raúl 2014-2-19
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 个)

类别

Help CenterFile Exchange 中查找有关 Orange 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by