Reset the order of table columns

10 ビュー (過去 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 Center および File ExchangeTables についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by