1つのCSVファイルを分割してインポート
15 views (last 30 days)
Show older comments
CSVファイルをインポートし解析をしたいのですが、データが全体のデータが20000ほどあり、これを1000データずつ読み込み解析したいと考えています。こちらのやり方が分かららず困っています。 ご指導して頂けると幸いです。
0 Comments
Accepted Answer
Kojiro Saito
on 18 Jan 2021
datastoreのReadSizeを1000にして、1チャンク毎に処理すれば良いと思います。
ds = datastore('mydata.csv', 'ReadSize', 1000);
while hasdata(ds)
t = read(ds); % 1000データずつの読み込み
% ここに1000データずつの解析
%
end
More Answers (0)
See Also
Categories
Find more on テキスト ファイル in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!