How to put sequence number in the table form?

10 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 23 Okt. 2017
Bearbeitet: Walter Roberson am 23 Okt. 2017
myfile{:,16} = (1:x).';

Weitere Antworten (0)

Kategorien

Mehr zu Tables finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by