Azzera filtri
Azzera filtri

How to put sequence number in the table form?

5 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Walter Roberson
Walter Roberson il 23 Ott 2017
Modificato: Walter Roberson il 23 Ott 2017
myfile{:,16} = (1:x).';

Più risposte (0)

Categorie

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

Community Treasure Hunt

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

Start Hunting!

Translated by