Add row numbers to side of table in MATLAB

28 次查看(过去 30 天)
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);

类别

Help CenterFile Exchange 中查找有关 Instrument Control Toolbox 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by