How to add another column
조회 수: 2 (최근 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
댓글 수: 0
채택된 답변
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.
댓글 수: 0
추가 답변 (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
참고 항목
카테고리
Help Center 및 File 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!