Shifting a value in a variable into a new row, under existing variable (Table)

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.

 Réponse acceptée

T = array2table(reshape(TabLe{:,:}, 3, []), 'VariableNames', {'M1', 'M2', 'M3', 'M4'})

Plus de réponses (0)

Catégories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by