How can I read a txt file and put the values in a matrix, skipping the first rows?
3 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
Jos
2014 年 9 月 23 日
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
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で LaTeX についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!