How I change the name of the variables in a table?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi! I have a table like that:
Movement_Table = table(Fetal_table.fetal_movement, Fetal_table_tot.r_prolongued_decelerations, Fetal_table_tot.r_prolongued_light_decelarations, Fetal_table_tot.r_prolongued_accelerations, Fetal_table_tot.r_uterine_contractionss)
How can I change the name of each Var?
Like Var1 renamed as 'Fetal Movement', Var2 as 'Prolongued Decelerations' and so on?
Thank you!
댓글 수: 0
답변 (1개)
KALYAN ACHARJYA
2022년 5월 15일
편집: KALYAN ACHARJYA
2022년 5월 15일
Just load the table, for example -
var1=[1:10]';
var2=[11:20]';
T=table(var1,var2)
% Change the Var names
T_new=renamevars(T,["var1","var2",], ["new_name1","new_name2"]);
T_new
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!