variable to output name
古いコメントを表示
name = 'adams'
c = 2x+4
I would like the value of "name" to be the variable for c. Therefore, instead of:
c = 2x+4
it would be:
adams = 2x+4
5 件のコメント
Azzi Abdelmalek
2013 年 11 月 1 日
Can you explain?
Leyon
2013 年 11 月 1 日
dpb
2013 年 11 月 1 日
Don't do this, use dynamic field names instead...
Leyon
2013 年 11 月 1 日
It isn't the only option, but I recommended it to you here
as the safest one. There are dangers in using assignin, eval, load, etc... to create variables inexplicitly. See, for example,
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Variables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!