View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Read large CSV file in column and save each column in mat file

Be the first to rate this file! 10 Downloads (last 30 days) File Size: 1.53 KB File ID: #36546 Version: 1.3
image thumbnail

Read large CSV file in column and save each column in mat file


Juan Huo (view profile)


07 May 2012 (Updated )

This is a draft to help you for transferring large CSV file or dat file into mat file

| Watch this File

File Information

We all feel headache about importing large data into matlab which may cause 'out of memory' problem. Since large CSV data usually stored in columns or rows, we can read CSV file column by column or row by row.

csvscan.m is a simple draft but work well for unlimited size of csv file, if each column data does not surpass the memory limitation. In my case, I have loaded 500M Bytes CSV file in 34 separated mat files. Hope it can help you.

Required Products MATLAB
MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
04 Jun 2012 per isakson

I think

eval(['save',' ', filename,' ', 'dataarray']);

may be replaced by

save( filename, 'dataarray' )

Comment only
04 Jun 2012 1.3

At the end of each loop, text=[]; and textarray=[] are added to release the memory.

Contact us