Convert table to array and back to table
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Krishna
am 21 Jun. 2022
Kommentiert: Krishna
am 21 Jun. 2022
Hi, I want to convert my table 'T'(1000 X 70) to an array 'A'. The table 'T' contains 70 different column headers. I again want to convert the array 'A' back to table 'T' without losing the column headers. How is it possible to do without manually entering all the 70 column headers as given below:
T = array2table(A,...
'VariableNames',{'Feet','Inches','Centimeters'})
0 Kommentare
Akzeptierte Antwort
Kevin Holly
am 21 Jun. 2022
A = randi([1 10],5,3)
T = array2table(A,'VariableNames',{'Feet','Inches','Centimeters'})
Header = T.Properties.VariableNames
Array = table2array(T)
NewTable = array2table(Array,'VariableNames',Header)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion 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!