How to add another column
古いコメントを表示
Hello,
I have a Data table using 9 variables. I want to create new one (Age) using previous column(rings) +1.
how can i do this ? please help.
thank you
採用された回答
その他の回答 (1 件)
KALYAN ACHARJYA
2019 年 10 月 23 日
編集済み: KALYAN ACHARJYA
2019 年 10 月 23 日
-How to add another column-
In the followig sample code, I have added New_col here
load patients %data file with Matlab
New_col=(1:100)'; %I have added this New_col data as new column in the table
result=table(Age,Gender,Height,New_col)
Hope it helps!
4 件のコメント
kav
2019 年 10 月 23 日
KALYAN ACHARJYA
2019 年 10 月 23 日
Here I have shown as you want
load patients %data file with Matlab
%New Column=Height+15, here Height is the one column in the table
New_col=Height+1.5; %I have added this New_col data as new column in the table
result=table(Age,Gender,Height,New_col)
kav
2019 年 10 月 23 日
KALYAN ACHARJYA
2019 年 10 月 23 日
Welcome!
カテゴリ
ヘルプ センター および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!