How to add another column

4 次查看(过去 30 天)
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

采纳的回答

Guillaume
Guillaume 2019-10-23
yourtable.Age = yourtable.Rings + 1.5;
by the sound of it. If not, then attach an example of your data as a mat file.

更多回答(1 个)

KALYAN ACHARJYA
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
kav 2019-10-23
yes got it thank you!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Large Files and Big Data 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by