Add row numbers to side of table in MATLAB

32 ビュー (過去 30 日間)
Logan Callahan
Logan Callahan 2022 年 4 月 19 日
コメント済み: Logan Callahan 2022 年 4 月 19 日
This is my code:
T = table(Name,Team,DVOA);
T.Name = categorical(T.Name);
T.Team = categorical(T.Team)
This is the output:
I need to add row numbers to the left-hand side of the table. Please help.
The result should look like this:

回答 (1 件)

Chris
Chris 2022 年 4 月 19 日
編集済み: Chris 2022 年 4 月 19 日
rownums = 1:size(T,1);
T.Properties.RowNames = string(rownums);
  1 件のコメント
Logan Callahan
Logan Callahan 2022 年 4 月 19 日
Thank you so much, work!!

サインインしてコメントする。

カテゴリ

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