extract dataset from textfile to many variables
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone, I have a textfile with N rows of data (N is very big, 45e6 for example). I would like to divide these N rows into k subsets of 1e6 rows (I suppose k is integer to simplify the problem), then save each subset to one file .mat. Could somebody show me how to code please ? Best regards, Winn
0 件のコメント
採用された回答
Walter Roberson
2013 年 6 月 9 日
If you are using OS-X or Linux, I suggest you use the Unix-level command "split"
On MS Windows, if efficiency is important, I suggest you use perl (which is included with all MATLAB releases.) The perl code can be seen at http://www.perlmonks.org/?node_id=90768
To do it in MATLAB, I would probably suggest doing the reading using textscan() with a format of '%s' and 'Delimiter', ''
3 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!