MATLAB: How to get the GUI to browse for a specific file

browsedirectoryguipathnamesearch directory

Hi. I am new to this Matlab GUI and would love your help.
I have an m-file that runs perfectly but wish to put in into a GUI (using GUIDE) to make it more user-friendly.
In my m-file, I manually insert the pathname for the directory in which the necessary jpeg images are to be found. How do I execute this in the GUI? How can I get the user to be able to select the path/file in which the GUI can extract and use the JPEGs within the selected file? I think I need some kind of "browse the user's computer directory" function but am not sure how to achieve this? And how do I then put this path into the m-file?
Any help and advice would be greatly appreciated.
Sue x

Best Answer

Hi Sue,
you can use uigetfile to open a dialog where the user can choose the file.
Gerd