Effacer les filtres
Effacer les filtres

How to skip the first row while reading a textfile?

4 vues (au cours des 30 derniers jours)
TP Das
TP Das le 15 Jan 2015
Commenté : TP Das le 13 Fév 2015
I have a textfile with the first row comprising strings. The rest of the rows are numbers. I need to read only the numbers (second row onwards upto the end of the file). The number of rows is not fixed. Any solution?

Réponse acceptée

Geoff Hayes
Geoff Hayes le 15 Jan 2015
TP - try using importdata and specify the number of header lines (in your case, 1) which cause those header lines to be skipped. Other MATLAB file reader functions (for data import) can do the same thing too.
  1 commentaire
TP Das
TP Das le 13 Fév 2015
The dlmread command also works nice....

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Analysis 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