Matlab color coded matrix

10 ビュー (過去 30 日間)
Dominic Eslamian
Dominic Eslamian 2020 年 3 月 26 日
回答済み: Divya Yerraguntla 2020 年 4 月 2 日
I would like to create this matrix in matlab and color code cells greather than 1.0. Frequencies as a row on top, time (hrs) column. And cells populated with data.

回答 (1 件)

Divya Yerraguntla
Divya Yerraguntla 2020 年 4 月 2 日
Hi Dominic,
You could change the colormap in the code to:
colormap = [1 1 1;1 0 0]; %[W R]
as you use only 2 colors(white or red) and 2 categories of values (<1 or >1) fill the cells.
Hope it helps!

カテゴリ

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