MATLAB: Displaying Files using a Listbox in a GUIDE GUI.

guidematlab gui

I have written a GUI that pulls data from a file and makes plots. Currently, I have coded a pushbutton to retrieve the files, but I want to put a listbox in the GUI that acts as a directory.
I figure this is a common operation, but I haven't been able to find much to get me started.

Best Answer

Where exactly are you running into trouble? Posting your relevant code so far might help. As for displaying the files in the listbox, to do that you just need to set the box's 'String' property.
d = dir; %get files
set(handles.my_listbox,'String',{d.name}) %set string