Effacer les filtres
Effacer les filtres

How to put sequence number in the table form?

5 vues (au cours des 30 derniers jours)
Kasih Ditaningtyas Sari Pratiwi
Hi, I am new in matlab and have a problem in putting sequence number on the table. Could you please help me? so here is my code:
x=height(myfile) %to know the number of rows in the table
myfile{:,16}=[1:x] %to fill down column 16 with sequence number until the last row
However, it did not work well :( Thank you very much for your help.

Réponse acceptée

Walter Roberson
Walter Roberson le 23 Oct 2017
Modifié(e) : Walter Roberson le 23 Oct 2017
myfile{:,16} = (1:x).';

Plus de réponses (0)

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by