Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Delete single line using textscan
Date: Sat, 2 Aug 2008 10:15:05 +0000 (UTC)
Organization: Pierburg GmbH
Lines: 24
Message-ID: <g71c39$ng2$1@fred.mathworks.com>
References: <g6vscv$91j$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1217672105 24066 172.30.248.35 (2 Aug 2008 10:15:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 2 Aug 2008 10:15:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 872224
Xref: news.mathworks.com comp.soft-sys.matlab:483268



"David Reed" <dreed@mitre.org> wrote in message
<g6vscv$91j$1@fred.mathworks.com>...
> I want to use textscan to bring in a whole bunch of data,
> almost 50000 lines of it.  Everything is formatted nicely
> except for a few lines here and there.  
> 
> I need a way for text scan to not read these lines.  The
> problem is that they start like the others so I can't use
> commentstyle.  
> 
> Does anyone have any ideas.  Thanks

I don't know if this applies to your problem, but just as a
hint:
txt2mat from the file exchange has the option to ignore
lines in the text file that can be identified by one or more
distinct strings ('BadLineString', see the doc). It can also
import the whole file line-by-line, letting you sort out the
critical lines afterwards. Note that it is made for an
import of data resulting in a single numeric matrix. If you
need advice with txt2mat, you may contact me (the author)
via the file exchange 'Contact author' button.
Regards
Andres