Matlab color coded matrix
조회 수: 17 (최근 30일)
이전 댓글 표시
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. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/279846/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/279846/image.jpeg)
댓글 수: 0
답변 (1개)
Divya Yerraguntla
2020년 4월 2일
Hi Dominic,
Have a look at a similar question : https://in.mathworks.com/matlabcentral/answers/11513-display-matrix-values-with-color-coding
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!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Colormaps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!