Add cell to table
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MARTINA ROGERS
am 12 Mai 2022
Kommentiert: BILAL
am 9 Nov. 2022
Hi there, novice user so please forgive any errors. Using Matlab R2022a. I have a large table (7x1516) and a cell (1x1516) with what I want to be the variable names for the table. It is obviously too big to just do normal VariableNames, is there a way to just merge these two to make the contents of the cell be the header of the table? Thanks!
0 Kommentare
Akzeptierte Antwort
Matt J
am 12 Mai 2022
Bearbeitet: Matt J
am 12 Mai 2022
As a simplified example,
T=array2table(rand(4,5)); %A randomly generated table
Headings={'dog','cat','fish','fox','hamster'}; %desired column headings
T.Properties.VariableNames=Headings %add the headings
5 Kommentare
BILAL
am 9 Nov. 2022
how'd you figure this out, I'm getting the error "When table is the second input, the first input must be a valid parent"
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations 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!