Skip to content

Instantly share code, notes, and snippets.

@juniorhero
Created August 27, 2016 19:58
Show Gist options
  • Save juniorhero/445fd369af3a79560f839b230950cae5 to your computer and use it in GitHub Desktop.
Save juniorhero/445fd369af3a79560f839b230950cae5 to your computer and use it in GitHub Desktop.
Select Files with Specific File Types using Dialog Box in Matlab GUI
function pushbutton2_Callback(hObject, eventdata, handles)
% above line of code is default line ofcode for button
% an example to open image files only
% when button is clicked, a dialog box appears to select the file
handles.output = hObject;
[fn pn] = uigetfile( {
'*.png;*.jpg;*.jpeg;*.gif','Image Files (*.png, *.jpg, *.jpeg, *.gif)'; ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment