Reset the order of table columns
6 次查看(过去 30 天)
显示 更早的评论
Is it possible to change the order of columns in matlab table? Lets assume 5th column is parameter A. Can I bring it to the first column?
0 个评论
回答(2 个)
the cyclist
2019-11-15
% Make the table
x = rand(2,1);
y = rand(2,1);
tbl = table(x,y)
% Rearrange the column order
tbl = tbl(:,[2 1]);
0 个评论
Steven Lord
2019-11-15
If you're using release R2018a or later you could use the movevars function.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!