How to plot the on-off status matrix with elements displayed
Show older comments
I want to plot a figure like this with matlab. The elements are presented and marked with differetn colors.

Answers (1)
Walter Roberson
on 11 May 2022
0 votes
image() with a colormap with two entries. If you need the labels then text() them into place. You can use find() to get row and column numbers. Remember that row numbers are y coordinates and column numbers are x coordinates.
1 Comment
Rongxing Hu
on 16 May 2022
Categories
Find more on Color and Styling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!