How to add another column

2 Ansichten (letzte 30 Tage)
kav
kav am 23 Okt. 2019
Kommentiert: KALYAN ACHARJYA am 23 Okt. 2019
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

Akzeptierte Antwort

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

Weitere Antworten (1)

KALYAN ACHARJYA
KALYAN ACHARJYA am 23 Okt. 2019
Bearbeitet: KALYAN ACHARJYA am 23 Okt. 2019
-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 Kommentare
kav
kav am 23 Okt. 2019
yes got it thank you!
KALYAN ACHARJYA
KALYAN ACHARJYA am 23 Okt. 2019
Welcome!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by