Skip to content

Instantly share code, notes, and snippets.

@juniorhero
Created August 27, 2016 18:39
Show Gist options
  • Save juniorhero/94f55a18f76da3001cfcd065afc607ba to your computer and use it in GitHub Desktop.
Save juniorhero/94f55a18f76da3001cfcd065afc607ba to your computer and use it in GitHub Desktop.
Matlab GUI Button Press Fetches Image url and Show Image
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
handles.output = hObject;
[fn pn] = uigetfile('*.png','select png file');
complete = strcat(pn,fn);
set(handles.edit1,'string',complete);
I = imread(complete);
imshow(I,[]);
guidata(hObject, handles);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment