Shifting a value in a variable into a new row, under existing variable (Table)
4 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
madhan ravi
on 1 Sep 2020
T = array2table(reshape(TabLe{:,:}, 3, []), 'VariableNames', {'M1', 'M2', 'M3', 'M4'})
0 Comments
More Answers (0)
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!