Azzera filtri
Azzera filtri

How can I read a txt file and put the values in a matrix, skipping the first rows?

3 visualizzazioni (ultimi 30 giorni)
Hi to everyone,
I'm trying to read a txt file (ex. trial.txt) with matlab and put the value into a matrix without success. The text file is made up as follow:
(title "xxxxx")
(labels "Position" "xxxxxx")
((xy/key/label "line-a2")
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
My problem is to skip the first rows. Can someone help me?
thanks in advance

Risposte (1)

Jos
Jos il 23 Set 2014
M=dlmread('trial.txt','',skipRows,skipColumns)
where skipRows is the number of rows you don't want to read at the start of your file and skipColumns is the number of columns you want to skip from the left hand side

Categorie

Scopri di più su Data Type Conversion 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