Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!postnews.google.com!z6g2000pre.googlegroups.com!not-for-mail
From: supandey@yahoo.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: textread - recall last position
Date: Thu, 12 Feb 2009 08:08:50 -0800 (PST)
Organization: http://groups.google.com
Lines: 26
Message-ID: <9e79b69d-9aee-46e3-93b0-4cb649bda257@z6g2000pre.googlegroups.com>
References: <dc52385c-cfea-4944-b563-bcc8c1a9a27c@g1g2000pra.googlegroups.com> 
	<b9f14884-002b-4cfe-b5ee-751ed6a1c3e3@w39g2000prb.googlegroups.com> 
	<gmvj46$sv0$1@fred.mathworks.com>
NNTP-Posting-Host: 67.200.102.202
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1234454930 17344 127.0.0.1 (12 Feb 2009 16:08:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 12 Feb 2009 16:08:50 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: z6g2000pre.googlegroups.com; posting-host=67.200.102.202; 
	posting-account=XCKuqgkAAABrNMgKkm-of-H0byX2WHJW
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SU 3.004; 
	GTB5; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:517890


On Feb 11, 4:23=A0pm, "us " <u...@neurol.unizh.ch> wrote:
> supan...@yahoo.com
>
> > Unfortunately my version of Matlab (v6.5) does not have textscan...
>
> well, did you try other solutions that were presented to you...
>
> us

I did not try this yet:

     fnam=3D't.txt'; % <- your text file...
     s=3Dtextread(fnam,'%s','delimiter','\n');
     d=3Dcellfun(@(x) sscanf(x,'%g,').',s(2:end),'uni',false);
     d{1:2} % <- or d{:}

The issue is that the file I want to read has about 40 million rows in
it (each row has 200 variables). I think the

s=3Dtextread(fnam,'%s','delimiter','\n');

will read the whole file in and than run into memory overflow
problems. Hence my need to read the file in chunks.

Thanks,
Sanjeev