Plotting matrix coordinates with indices?

If I have a matrix with '0's and '1's, how can i make a 2D plot of points with coordinates corresponding to the cell indices of the '1's?

1 件のコメント

Matt Kindig
Matt Kindig 2013 年 7 月 17 日
Are the '0's and '1's actually part of a numeric matrix, or do you mean the actual characters '0' and '1', as part of a char matrix or a cell array? If it is numeric, the spy() function should do what you want.
doc spy

サインインしてコメントする。

回答 (1 件)

Evan
Evan 2013 年 7 月 17 日
編集済み: Evan 2013 年 7 月 17 日

0 投票

If I understand correctly, I think imagesc would work:
M = eye(50); %example matrix
imagesc(M)

カテゴリ

ヘルプ センター および File ExchangeDiscrete Data Plots についてさらに検索

タグ

質問済み:

2013 年 7 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by