how to read text file and to ignore the first 10 rows and to take only the 4rth and 5th columns?
古いコメントを表示
how to read text file and to ignore the first 10 rows and to take only the 4rth and 5th columns? from this file: http://iopscience.iop.org/0266-5611/17/6/301/media/dielTM_dec4f.exp
i tried to use textscan but i don't really understand how to and it looks a bit complicated
any other solution or how to do this?
採用された回答
その他の回答 (1 件)
Image Analyst
2014 年 9 月 15 日
Maybe try importdata()
delimiterIn = ' ';
headerlinesIn = 10;
myStructure = importdata(filename,delimiterIn,headerlinesIn);
data = myStructure.data;
Worked for me.
2 件のコメント
Image Analyst
2014 年 9 月 15 日
You could do it all in just 2 lines instead of the 3 required for textscan(). Plus you don't need to figure out all that stuff about '%*f%*f%*f%f%f%*f%*f' since it figures it out for you.
per isakson
2014 年 9 月 16 日
編集済み: per isakson
2014 年 9 月 16 日
Problem is I don't know about importdata ;-).
カテゴリ
ヘルプ センター および File Exchange で Large Files and Big Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!