How to plot binary matrix as dots?
显示 更早的评论
I have a Matrix with ones and zeroes. How to plots the matrix with zeroes as black spot and ones as whote dots as shown in figure below.

采纳的回答
更多回答(3 个)
millercommamatt
2021-9-15
FH = figure;
imagesc(yourMatrix);
colormap(FH,[0,0,0;1,1,1]);
M = magic(7);
B = M > mean(M);
colormap('gray')
imagesc(B)
axis square
imshow(yourMatrix)
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


