How to import big data files
18 views (last 30 days)
Show older comments
Is there any fast way to import a hugh dataset (approx. 10Mio. rows) into Matlab? I tried importing my csv. file with the help of the import function, but its been running for a couple of hours by now. Has someone an useful advice?
2 Comments
Rik
on 29 Oct 2017
How large are those rows? This shouldn't take this long.
One way to reduce time is to figure out the most direct function to do the job, dlmread or csvread in this case.
Accepted Answer
per isakson
on 29 Oct 2017
Edited: per isakson
on 29 Oct 2017
"running for a couple of hours" that doesn't sound right.
- How many columns are there?
- How much RAM do you have?
- If it's pure numerical data try load -ascii otherwise textscan they are faster.
14 Comments
per isakson
on 23 May 2019
Edited: per isakson
on 23 May 2019
In this context it's a big difference between "pure numerical data" and "mostly some numbers". Either it is 100% numerical or it's not.
Proposal: Post a new question with a good title and more details on the format of the file. Attach an excerpt of the file. A few lines is enough.
If you post a comment here announcing the question, I'll find it.
Abhishek Singh
on 24 May 2019
Yes, I guess my question is a little bit different to the one here. Yes, the columns are purely numerical.
More Answers (0)
See Also
Categories
Find more on Standard File Formats in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!