How do I add a column to table?
古いコメントを表示
I have created a CSV file. When I use the "readable" function to load the table, I get an 8x10 table. I want to expand the table to an 8x11 table, where the 11th column should have the values from a function I have created. How do I do this?
採用された回答
その他の回答 (3 件)
Sean de Wolski
2015 年 11 月 20 日
T.EleventhColumn = rand(8,1);
Where 'EleventhColumn' is the name you want for the variable.
2 件のコメント
Theodore Wilkening
2020 年 3 月 13 日
this works best.
Yifei
2022 年 11 月 26 日
The most convenient approach.
thang ngo
2020 年 7 月 24 日
14 投票
This helps to pass a name as parameter:
name = 'new_column'
T.(name) = rand(8,1);
Ehab Abdelkarim
2018 年 8 月 3 日
2 投票
you may want to check the following link https://de.mathworks.com/help/matlab/matlab_prog/add-and-delete-table-variables.html
カテゴリ
ヘルプ センター および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!