Reset the order of table columns

조회 수: 4 (최근 30일)
Zeynab Mousavikhamene
Zeynab Mousavikhamene 2019년 11월 15일
편집: Zeynab Mousavikhamene 2019년 11월 15일
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?

답변 (2개)

the cyclist
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]);

Steven Lord
Steven Lord 2019년 11월 15일
If you're using release R2018a or later you could use the movevars function.

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by