Use text in table to make variables
Afficher commentaires plus anciens
I have a table, T; the first column contains text enclosed in single quotes, and the second column contains scalar numbers:
Symbol Value
1 'Z1' 3
2 'Z2' 4
How can I get Matlab to create variables from the Symbols and assign the Values to them? ie
Z1=3
Z2=4
I could convert T.Symbol into a string vector:
T.Symbol =s,
but how can I convert s into variables, without having to type each variable manually? (In reality, my table contains many rows, and I have more than one table.)
Réponse acceptée
Plus de réponses (1)
dpb
le 22 Jan 2021
0 votes
Do NOT even think about doing this.
1 commentaire
David Slater
le 23 Jan 2021
Catégories
En savoir plus sur Tables dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!