Effacer les filtres
Effacer les filtres

write image and display

1 vue (au cours des 30 derniers jours)
PK
PK le 29 Sep 2016
Commenté : PK le 29 Sep 2016
I want to write H as an image and display. Please help me.
  1 commentaire
Adam
Adam le 29 Sep 2016
What is H? The letter H or some matrix or what?

Connectez-vous pour commenter.

Réponse acceptée

Massimo Zanetti
Massimo Zanetti le 29 Sep 2016
Modifié(e) : Massimo Zanetti le 29 Sep 2016
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 commentaire
PK
PK le 29 Sep 2016
thanks you!

Connectez-vous pour commenter.

Plus de réponses (1)

Image Analyst
Image Analyst le 29 Sep 2016
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.

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by