No BSD License  

Highlights from
robustreadcsv

4.83333

4.8 | 6 ratings Rate this file 4 Downloads (last 30 days) File Size: 578 Bytes File ID: #3123
image thumbnail

robustreadcsv

by Michael Robbins

 

13 Mar 2003 (Updated 18 Mar 2003)

CSVREAD for files with varying number of cols.

| Watch this File

File Information
Description

If you have a file that has more commas in some lines than others, this is for you.

It's very simple, but it may help some of you.

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (6)
01 Apr 2004 Ricardo Pachon

Indeed, it can help you! Perhaps you must add a few lines so it fits your needs, but it will work fine.

28 Feb 2005 Francis Pieraut

Great! This function should be include by defalut in matlab. It works perfectly.

15 Jan 2006 Dan Don

Simple and effective

17 Feb 2006 Chris Zhou

Excellent reader, but consume too much memory for large files

21 Oct 2008 Michael Koelemay

This function is indeed really great, and robust.

I added 1 line to hugely boost performance by preallocating the output array "MM". To do this, just add this line right before the "for" loop:

MM=cell(length(M),max(cellfun(@length,regexp(M,','))));

19 Mar 2009 Sahin Aktas  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data import Michael Robbins 22 Oct 2008 06:58:05
data export Michael Robbins 22 Oct 2008 06:58:05
read Michael Robbins 22 Oct 2008 06:58:05
csv Michael Robbins 22 Oct 2008 06:58:05
dlmread Michael Robbins 22 Oct 2008 06:58:05
csvread Michael Robbins 22 Oct 2008 06:58:05
file Michael Robbins 22 Oct 2008 06:58:05
io Michael Robbins 22 Oct 2008 06:58:05
delimited Michael Robbins 22 Oct 2008 06:58:05

Contact us at files@mathworks.com