フィルターのクリア

Plot a 100x100 grid of 1's and 0's

3 ビュー (過去 30 日間)
Chloe O'Mahony
Chloe O'Mahony 2020 年 4 月 27 日
回答済み: James Tursa 2020 年 4 月 28 日
I have a 100x100 matrix of 1's and 0's that form a grid pattern with diagonal lines through it. How do I plot this on a graph for a visual representation of the pattern?
example:
1 1 1 1 1
1 0 0 1 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

採用された回答

Adam Danz
Adam Danz 2020 年 4 月 27 日
編集済み: Adam Danz 2020 年 4 月 28 日
The axes will not be 'on' for imagesc or image but you should turn the axes on so you can see how the axes are arranged (particularly the y-axis).
axis on
If you plan on customizing the plot, heatmap is more difficult to work with.

その他の回答 (1 件)

James Tursa
James Tursa 2020 年 4 月 28 日
Another option:
b = your binary matrix
spy(b);

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by