Convert A String Into a MATLAB Variable Name
2 ビュー (過去 30 日間)
古いコメントを表示
I was trying to figure out if a had a string such as a= 'TEMP' and create a second variable which has the name TEMP which I would assign a corresponding value to. The problem is that I want to have 'TEMP' vary in a loop or as part of a function without have to manually assign it.
0 件のコメント
回答 (2 件)
Sean de Wolski
2011 年 7 月 7 日
Don't do it!
What if the variable name is 'size' or 'sum' or something useful and you overwrite a needed builtin function?
参考
カテゴリ
Help Center および File Exchange で Introduction to Installation and Licensing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!