New column to a table with the dynamic name

1 Ansicht (letzte 30 Tage)
Zeynab Mousavikhamene
Zeynab Mousavikhamene am 20 Nov. 2019
Beantwortet: Walter Roberson am 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?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 20 Nov. 2019
Yourtable.(expression) = value
The () are part of the syntax.

Weitere Antworten (0)

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by