New column to a table with the dynamic name
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Zeynab Mousavikhamene
le 20 Nov 2019
Réponse apportée : Walter Roberson
le 20 Nov 2019
I new to add a new column to a table. The name of column is like this:
column_name=strcat('A_',num2str(se));
and then I will add the 'column_name' to the table like this:
table.column_name=...
How can I merge these two lines to one line? I mean defining the table column and adding it to the table in one line?
0 commentaires
Réponse acceptée
Walter Roberson
le 20 Nov 2019
Yourtable.(expression) = value
The () are part of the syntax.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!