Path: news.mathworks.com!newsfeed-00.mathworks.com!fu-berlin.de!news.albasani.net!feeder.eternal-september.org!eternal-september.org!not-for-mail
From: dpb <none@non.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: read large text files
Date: Wed, 28 Oct 2009 08:45:32 -0500
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <hc9i7k$a39$1@news.eternal-september.org>
References: <hc85sr$f4q$1@fred.mathworks.com> <hc88hj$k9a$1@news.eternal-september.org> <b976d3af-5074-4042-8ca3-d96de0e02de8@g1g2000vbr.googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.eternal-september.org U2FsdGVkX1+tLB6wnNEHFZ6398mga10cjr3fdiOi0G1+3a9zyL0hPq+NlUJt2IFKBCo5kkM0KMVrABswRM0oAs7dS5mQsQw5T5CvhTDAdd3qBOlMcvi6R88HPL9B1NGeUAdMfoQso160/MvcHGl6bw==
X-Complaints-To: abuse@eternal-september.org
NNTP-Posting-Date: Wed, 28 Oct 2009 13:50:45 +0000 (UTC)
In-Reply-To: <b976d3af-5074-4042-8ca3-d96de0e02de8@g1g2000vbr.googlegroups.com>
X-Auth-Sender: U2FsdGVkX1/vVmgvltFGp2qUssqlgtEk5YwYOFAbar0=
Cancel-Lock: sha1:2Wx5XH+pGZfLl4L28iK48AENRnM=
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
Xref: news.mathworks.com comp.soft-sys.matlab:580615


anandhi wrote:
...
> when i call textscan repeatedly on the same fid and continue
>  it does continue upto 100000 lines only after which it does not
> continue.
> 
> eg the file has 1179919 lines
> 
> segarray = textscan(file_id, format);
> segarray1 = textscan(file_id, format);
> 
> I still get the size of segarray1 empty

I'd suspect there's a problem in the file at that point then.  From
Remarks section in documentation--

"When textscan reads a specified file or string, it attempts to match 
the data to the format string. If textscan fails to convert a data 
field, it stops reading and returns all fields read before the failure."

Perhaps during your experimenting you accidentally wrote an EOF or some 
other data to the file???

I'd suggest using a text-listing/viewing tool to verify the file is, 
indeed, still pristine (my hunch is you'll find it isn't).

--