필터 지우기
필터 지우기

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 CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by