Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: processing extremely long data file sequentially?
Date: Sun, 9 Mar 2008 15:11:03 +0000 (UTC)
Organization: Pierburg GmbH
Lines: 26
Message-ID: <fr0um7$pse$1@fred.mathworks.com>
References: <fqacv8$et8$1@news.Stanford.EDU>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1205075463 26510 172.30.248.38 (9 Mar 2008 15:11:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 9 Mar 2008 15:11:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 872224
Xref: news.mathworks.com comp.soft-sys.matlab:456195



"huhua" <lunamoonmoon@gmail.com> wrote in message
<fqacv8$et8$1@news.Stanford.EDU>...
> Hi all,
> 
> Let's say a CSV file has tens of millions lines and each
line has many 
> columns.
> 
> I actually wanted to browse through it line by line
(except the first line, 
> which is the headline),
> 
> and I need to cut most of the lines and columns out, and
only use a few 
> lines and columns.

> []

If the csv contains mainly numeric data below the header
line, you may try txt2mat from the file exchange with its
'RowRange' and 'FilePos' arguments (see Help, esp. Example
5). This should be vastly quicker than fgetl.
Hth
Andres