How to display an image within the figure in App Designer?
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi,
I used to work with GUI and I am very new to the 'App Designer'. As you can see here I have created an interface.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/804009/image.png)
I am hoping to click on the top button 'load your image', select an image in the file, then display it in the 'image' area. I don't know how to achieve this.
Please can anyone give me some advices? :)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/804014/image.png)
댓글 수: 0
채택된 답변
Yongjian Feng
2021년 11월 17일
편집: Yongjian Feng
2021년 11월 17일
Try this in your callback:
[file, path] = uigetfile({'*.png'; '*.jpg'}, 'Select file');
app.Image.ImageSource = [path file];
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!