How to display image in a GUI programmatically (without GUIDE)

조회 수: 3 (최근 30일)
Mehdi
Mehdi 2015년 5월 17일
댓글: Stephen23 2015년 5월 17일
Hi everyone,
I have created a GUI (without GUIDE) in which I have added an "axes" as follows:
logo_tos = axes('parent', amfig, 'Position', [0.098 .25 .8 0.8], 'Units', 'normalized', 'color', 'w');
to display an image. The code that I have used is:
logo = imread ('myimage.PNG');
But it doesn't show anything. Could anyone please tell me what I'm missing here? I'd be very grateful.
  댓글 수: 1
Stephen23
Stephen23 2015년 5월 17일
imread only reads the file into MATLAB's memory, exactly as the documentation states. To display an image you need to use another command, such as image

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2015년 5월 17일
You still need to
image(logo, 'Parent', logo_tos);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by