Add row numbers to side of table in MATLAB

33 visualizzazioni (ultimi 30 giorni)
Logan Callahan
Logan Callahan il 19 Apr 2022
Commentato: Logan Callahan il 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:

Risposte (1)

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

Categorie

Scopri di più su Tables in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by