Add row numbers to side of table in MATLAB

43 Ansichten (letzte 30 Tage)
Logan Callahan
Logan Callahan am 19 Apr. 2022
Kommentiert: Logan Callahan am 19 Apr. 2022
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:

Antworten (1)

Chris
Chris am 19 Apr. 2022
Bearbeitet: Chris am 19 Apr. 2022
rownums = 1:size(T,1);
T.Properties.RowNames = string(rownums);

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by