.MAT variables to list box
1 回表示 (過去 30 日間)
古いコメントを表示
I am trying to list the contents of a .MAT file in a list box. to choose which one to import into a CSV file. I am currently using a uiget command that outputs the .MAT file as a string. How do I access the contents of the .MAT file and export them to a list box? I am using 2007b
Thank you.
0 件のコメント
採用された回答
Fangjun Jiang
2011 年 6 月 9 日
This should get you started.
MatFile=uigetfile('*.mat');
MyVar=load(MatFile);
VarNames=fieldnames(MyVar);
2 件のコメント
Fangjun Jiang
2011 年 6 月 10 日
The above lines give you the variable names in your .mat file. You probably will need to use set() to put them into your listbox.
h=uicontrol('style','listbox','Position',[20 20 100 100]);
set(h,'string',VarNames);
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!