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 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Daniel
le 22 Août 2016
Modifié(e) : Daniel
le 22 Août 2016
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 commentaires
Voir également
Catégories
En savoir plus sur Environment and Settings dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!