how to plot (0 1) matrix on figure
6 次查看(过去 30 天)
显示 更早的评论
I have a big matrix with 0 and 1:
0 0 0 1 0 1 0 ...
0 0 0 1 0 1 0 ...
1 0 0 1 0 0 1 ...
...
I want to crate a dot plot where axis x wil be the number of columns, axis y will be the number of rows. Dots in line x=1 should apper if in first column vale=1 and not if value =0; dots in line x=2 should apper if in second column vale=1 and not if value=0; etc...
Thanks in advance for help
2 个评论
采纳的回答
Star Strider
2025-2-28
I am not certain what you intend by ‘dot plot’, however the spy function exists to do just that, if you only want to depict the elements —
M = [0 0 0 1 0 1 0
0 0 0 1 0 1 0
1 0 0 1 0 0 1];
figure
spy(M)
.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!