フィルターのクリア

write image and display

3 ビュー (過去 30 日間)
PK
PK 2016 年 9 月 29 日
コメント済み: PK 2016 年 9 月 29 日
I want to write H as an image and display. Please help me.
  1 件のコメント
Adam
Adam 2016 年 9 月 29 日
What is H? The letter H or some matrix or what?

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

採用された回答

Massimo Zanetti
Massimo Zanetti 2016 年 9 月 29 日
編集済み: Massimo Zanetti 2016 年 9 月 29 日
Do this.
H=zeros(100);
H(:,10:20)=1;
H(:,80:90)=1;
H(46:55,10:90)=1;
imagesc(H); axis image;
It should be the right H.
  1 件のコメント
PK
PK 2016 年 9 月 29 日
thanks you!

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2016 年 9 月 29 日
Or, if you don't want some weird colormap applied by default (like imagesc applies for some reason):
imshow(H, []);
To write H to disk, you can use imwrite() if it's an integer array and you want a standard image format, or use save() if you want to save a floating point image. If you want to save a screenshot of your entire figure/GUI, use export_fig.

カテゴリ

Help Center および File ExchangeImages についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by