How can you use a GUI pop up menu to display file name in a folder
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Thomas
am 13 Feb. 2014
Kommentiert: Thomas
am 14 Feb. 2014
Hey guys, the GUI i made needs to let the user select a text file from a folder, then plot data stored in this text file.
Is there some way i can use the GUI's pop up menu (or even another GUI object) to access files in a certain folder (and perhaps display the file names), allowing the user to choose one.
Im planning to use a while loop which plots data with respect to the chosen file.
Im new to matlab so i only know the basics of matlab coding.
Thanks guys.
0 Kommentare
Akzeptierte Antwort
Sandeep Math
am 13 Feb. 2014
Bearbeitet: Sandeep Math
am 13 Feb. 2014
You could use a pop up menu populated with names of files that you want the user to choose or you could use a push button whose callback opens file selection dialog (see 'uiopen') and the user chooses a text file from here. I think you have figured out how to read the text file (see 'fileread' and 'regexp') and plot it. You could put all this in a script or function file and place it in the callback function for the UI object.
Here is a good set of examples GUIs in MATLAB: http://blogs.mathworks.com/pick/2010/02/12/41-complete-gui-examples/
HTH
-SH
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!