From: Jon on 9 Jun 2010 20:41 "Atahan Tolunay" <atato326(a)hotmail.com> wrote in message <hupbs1$7k3$1(a)fred.mathworks.com>... > I have several files named "Jack.mat, Peter.mat, Kelly.mat" in my folder. When I start up my MainGUI.m I want all those file names to be imported to my listbox. What kind of function do I need to write in the listbox1_CreateFcn to import all .mat file names in my folder into the listbox on startup? cd('directory') moves you to the directory names = dir('*.dat') would find every file ending in .dat and save it to a structure. names(1).name would give you the name of the first file for instance.
|
Pages: 1 Prev: Loop appending to wave file code odd behavior Next: Reading .mat filenames into a listbox |