variable to output name
Ältere Kommentare anzeigen
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 Kommentare
Azzi Abdelmalek
am 1 Nov. 2013
Can you explain?
Leyon
am 1 Nov. 2013
dpb
am 1 Nov. 2013
Don't do this, use dynamic field names instead...
Leyon
am 1 Nov. 2013
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,
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Variables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!