i want to design a GUI interface with a push button and when i click on the button it opens a pop window to insert a picture from my pc
조회 수: 2 (최근 30일)
이전 댓글 표시
i want to design a GUI interface with a push button and when i click on the button it opens a pop window to insert a picture from my pc
댓글 수: 0
답변 (1개)
Daniel
2016년 8월 22일
편집: Daniel
2016년 8월 22일
Here's one way of doing something similar to what you're asking.
function getImageExample
clf(gcf)
ax = gca;
uicontrol('style','pushbutton','string','add image','callback',@addImage);
function addImage(varargin)
[f,p] = uigetfile('*.png','Select Image','Multiselect','off');
if ~ischar(f),return,end
imshow(fullfile(p,f),'parent',ax)
end
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!