Clear Filters
Clear Filters

Read specific columns from a large csv file

2 views (last 30 days)
I have a csv file of 6000 columns need to use only 3000 for my analysis. These columns are not really a range of consecutive numbers. Is there a way I can do it to save computation of reading extra data when I need only half of it?

Accepted Answer

Jan
Jan on 11 Jul 2018
Edited: Jan on 11 Jul 2018
No. A CSV file is a text file. Matlab has to read each value to find the next one. There is no magic trick to reduce the work.
Huge text files are a bad design. Text files are useful, if they are read or modified by human. In all other cases binary files are much better, most of all faster to read, especially if you need some parts only.

More Answers (0)

Categories

Find more on Data Import and Export in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!