Naming Table Variables of a File
24 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Fatih
il 27 Set 2025 alle 19:02
Commentato: Fatih
il 27 Set 2025 alle 19:58
I have a table 3x1 where each value has 6 seperate values. I want to name these 6 column names. As shown in the attached screenshot, I want to name 1 for example Data1, 2 Data2 etc.
Thanks for help in advance.

0 Commenti
Risposta accettata
Torsten
il 27 Set 2025 alle 19:26
Modificato: Torsten
il 27 Set 2025 alle 19:31
load("T.mat")
T1 = splitvars(T);
T1 = renamevars(T1,["rows_1" "rows_2" "rows_3" "rows_4" "rows_5" "rows_6"],...
["Data1" "Data2" "Data3" "Data4" "Data5" "Data6"])
Alternatively:
T2 = renamevars(T,["rows"],["Data"]);
T2 = splitvars(T2)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Tables in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!