Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2.glorb.com!postnews.google.com!x6g2000pre.googlegroups.com!not-for-mail
From: NZTideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: textread - recall last position
Date: Wed, 11 Feb 2009 11:25:20 -0800 (PST)
Organization: http://groups.google.com
Lines: 22
Message-ID: <9947e827-8403-4016-ab42-696e4ad22caf@x6g2000pre.googlegroups.com>
References: <dc52385c-cfea-4944-b563-bcc8c1a9a27c@g1g2000pra.googlegroups.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1234380320 9257 127.0.0.1 (11 Feb 2009 19:25:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 11 Feb 2009 19:25:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: x6g2000pre.googlegroups.com; posting-host=202.78.152.105; 
	posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) 
	Gecko/2009011913 Firefox/3.0.6,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 bc3
Xref: news.mathworks.com comp.soft-sys.matlab:517693


On Feb 12, 8:22=A0am, supan...@yahoo.com wrote:
> Is it possible for textread to read from the last poistion it read
> from? For file -
>
> %test
> 10,20,30
> 40,50,60
>
> I can read via:
>
> [x1,x2,x3] =3D textread('t.txt','%d%d%d',
> 1,'delimiter',',','commentstyle','matlab');
> [y1,y2,y3] =3D textread('t.txt','%d%d%d',
> 1,'delimiter',',','commentstyle','matlab', 'headerlines', 2);
>
> Is there another solution which avoids using headerlines? Something
> like fseek/ftell?
>
> Thanks,
> Sanjeev

Use textscan for this