How can I read data from certain range in txt file in matlab?
3 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I would like to read from line 85 to line 1108 in txt file in matlab.
I don't know how to do it.
The data from line 85 to line 1108 looks like this:
I have 1024 data.
Can please anybody help me?
Thanks,
Hung Jr
0 件のコメント
採用された回答
Walter Roberson
2016 年 8 月 18 日
Use textscan() with HeaderLines set to 84, a format of '%f%f%f', and specify a count of (1108-85+1)
3 件のコメント
Walter Roberson
2016 年 8 月 18 日
fid = fopen('YourFile.txt', 'rt');
datacell = textscan(fid, '%f%f%f', (1108-85+1), 'HeaderLines', 84, 'CollectOutput', 1);
fclose(fid);
YourInput = datacell{1};
その他の回答 (0 件)
参考
カテゴリ
Help Center および 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!