Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!a17g2000prm.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: read ascii file
Date: Mon, 10 Nov 2008 05:44:03 -0800 (PST)
Organization: http://groups.google.com
Lines: 23
Message-ID: <008a086e-9fd0-45d6-b4ef-b3aef5c7755d@a17g2000prm.googlegroups.com>
References: <gf909u$4n9$1@fred.mathworks.com> <e2d1e726-82c5-4d32-865d-ab0700e0f092@r36g2000prf.googlegroups.com> 
	<gf9b2u$bon$1@fred.mathworks.com>
NNTP-Posting-Host: 77.17.97.15
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1226324643 25443 127.0.0.1 (10 Nov 2008 13:44:03 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 10 Nov 2008 13:44:03 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a17g2000prm.googlegroups.com; posting-host=77.17.97.15; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:499932


On 10 Nov, 13:57, "Andres" <rant...@werb.deNoRs> wrote:
> Rune Allnor <all...@tele.ntnu.no> wrote in message <e2d1e726-82c5-4d32-865d-ab0700e0f...@r36g2000prf.googlegroups.com>...
> > Regular expressions is the obvious first try.
>
> > Rune
>
> .
> Hi Rune,
> imho regular expressions are quite slow, and this could be noticeable for large files. If I had the choice, I'd just replace the braces with spaces.

The TXT2MAT function you suggested earlier uses
a syntax which is deceptively similar to a regular
expression. I can't find any documentation for the
function, though, so I don't know how it is implemented.

As for text files, it's very time-consuming to mess
with them. The only *real* time saving is to use a
binary format. This was discussed here not too long
ago:

http://groups.google.no/group/comp.soft-sys.matlab/msg/d49639538f61a0dc?hl=no

Rune