use strings to give commands
古いコメントを表示
Hi everyone,
I have many variables with different names and they all content a struct "Value". Now a program loads one of those variables in my workspace, only knowing by a string which one it is.
For example: str='xxx'; load('blabla.mat', str);
Now I want to get access to xxx.Value and I want to ask you, how I can get that command when I only have 'xxx' as a string?
As I told you, the program must being kept general, because xxx can stand for any of many variables.
Best regards and thank you! Oli
採用された回答
その他の回答 (1 件)
Olli
2011 年 9 月 24 日
0 投票
1 件のコメント
Fangjun Jiang
2011 年 9 月 24 日
Then, please accept the answer! I think this is a good solution and could be referenced by others.
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!