Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!l76g2000hse.googlegroups.com!not-for-mail
From: boivie@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: read multi-line data with multiple delimiters
Date: Fri, 24 Oct 2008 08:04:27 -0700 (PDT)
Organization: http://groups.google.com
Lines: 34
Message-ID: <70d4e42d-48e0-4f97-a9d2-83aa4eeed8c2@l76g2000hse.googlegroups.com>
NNTP-Posting-Host: 129.236.20.54
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1224860668 9498 127.0.0.1 (24 Oct 2008 15:04:28 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 24 Oct 2008 15:04:28 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: l76g2000hse.googlegroups.com; posting-host=129.236.20.54; 
	posting-account=n_evDQoAAACGu2lqvH-6uLNULp4evcXV
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) 
	Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:497112


Hi all - I've scoured the net and mathworks and haven't come across
how to solve this.  I haven't used Matlab in quite a while, and it
seems like this shouldn't be very hard, but I haven't managed to get
this yet.

The file I am reading in has data (after several file header lines)
that consists of one line of header info ("Line" or "Tie" and the
number - both of which I need to extract) and two lines of comma
delimited data associated with that header.  I seem to be able to
extract the first line of data using textscan with comma as the
delimiter.  Using regexp, I have gotten both lines of data, but as 4
variables, rather than 8.  Any pointers or code help would be much
appreciated.  Thanks.

-Ethan

This is what the file looks like:

/Data
/X,Y,Longitude,Latitude
//Flight 0
//Date 2008/09/27
Line  0
-450.0,50.0,147.5445363050,-76.4478227596
450.0,50.0,182.4554636951,-76.4478227596
Line  10
-450.0,-50.0,146.3500677843,-77.3018107353
450.0,-50.0,183.6499322158,-77.3018107353
Tie  -10
-360.0,-100.0,149.3523576944,-77.9633702276
-360.0,100.0,151.3351657935,-76.2267188392
Tie  0
-160.0,-100.0,157.9105218900,-78.3092770253
-160.0,100.0,158.8372826671,-76.5286269834