Colour matrix depending on the value
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Orange 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!