New column to a table with the dynamic name

11 ビュー (過去 30 日間)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2019 年 11 月 20 日
回答済み: Walter Roberson 2019 年 11 月 20 日
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?

採用された回答

Walter Roberson
Walter Roberson 2019 年 11 月 20 日
Yourtable.(expression) = value
The () are part of the syntax.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by