Shifting a value in a variable into a new row, under existing variable (Table)
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Siti Nurbaya
am 1 Sep. 2020
Beantwortet: madhan ravi
am 1 Sep. 2020
I have a table as shown in 'Table_1.png'. Each variables consist of the x,y,z coordinates of the Markers.
i.e M1_x means x coordinate of Marker1, M1_y means y coordinate of Marker2, M2_y means y coordinate of Marker2.
I would like to manipulate the table such that one column will have the xyz coordinates of each marker, meaning the table, from 1x12, becomes 3x4, as shown in 'Table_2.png'
Thank you so much :) Help is greatly appreciated.


0 Kommentare
Akzeptierte Antwort
madhan ravi
am 1 Sep. 2020
T = array2table(reshape(TabLe{:,:}, 3, []), 'VariableNames', {'M1', 'M2', 'M3', 'M4'})
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables 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!