list all subfolder names

4 ビュー (過去 30 日間)
Diana Acreala
Diana Acreala 2011 年 9 月 1 日
Hello everyone! I have a problem here and I really don't know how to start...
So... in my Diana directory I will have the following subfolders: Version_001, Version_002,etc. until Version_999. Each of these subfolders will contain a myfile.mat.
To understand better I will make an example.
I'm starting with myfile.mat file from Version_001. I am modifying the values of a parameter existing in myfile.mat. Next stept is to save this updated myfile.mat in Version_002 and so on.
what I want to do is to see the history of a selected parameter. Something like using a list in my GUI that should contain : Version_001 selected_parameter_values Version_002 selected_parameter_values . . . etc
How do you advise me to start?

回答 (2 件)

Yoav Livneh
Yoav Livneh 2011 年 9 月 1 日
Each time you save the parameter in a new .mat file, save that parameter to a new cell in a cell array. Then you can use a uitable to show all of your data.
Is that what you meant?

Matt Landow*
Matt Landow* 2011 年 9 月 1 日
You can use the http://www.mathworks.com/help/techdoc/ref/dir.html function to list all files and folders. Assuming you have each folder in the same location you can just create a loop.
pseudo code
for all directories
open file in folder
change stuff
save stuff
update GUI
end
Hopefully that helps, best of luck!

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by