フィルターのクリア

Colour matrix depending on the value

2 ビュー (過去 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 Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by