how can i convert the content of a character array to a variable name
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
AA
am 29 Mär. 2020
Beantwortet: David Hill
am 29 Mär. 2020
Hi,
I have a character variable called xx=Hello.
I want to convert that xx variable to a matrix name variable named Hello.
How can I do this?
0 Kommentare
Akzeptierte Antwort
David Hill
am 29 Mär. 2020
Generally, you should not do what you are trying to do. One possible solution is to use a struct.
xx='Helo';
myStruct.(xx)=magic(5);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!