How to plot binary matrix as dots?
Afficher commentaires plus anciens
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.

Réponse acceptée
Plus de réponses (3)
millercommamatt
le 15 Sep 2021
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)
Catégories
En savoir plus sur Graphics Performance dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


