Path: news.mathworks.com!not-for-mail
From: "Leo Steenson" <lvsteenson@yahoo.co.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Importing text files with multiple headers
Date: Thu, 2 Jul 2009 14:06:02 +0000 (UTC)
Organization: Queens University Belfast
Lines: 9
Message-ID: <h2iesa$i90$1@fred.mathworks.com>
Reply-To: "Leo Steenson" <lvsteenson@yahoo.co.uk>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246543562 18720 172.30.248.38 (2 Jul 2009 14:06:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 2 Jul 2009 14:06:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 837249
Xref: news.mathworks.com comp.soft-sys.matlab:552392


I am trying to import text files into matlab.  The problem is that within the files there is a text header then some numerical data then header, data, header etc.

When I try to import the file (specifying that the numerical data starts on line 3) Matlab imports the first set of numerical data up until the next alphabetical line but not the whole file.

I have until now just repetively specified a larger and larger header (in a loop) as all the numerical data are of equal numbers of lines, but this is not nice and I miss some data for longer files.

Does anyone know of a command to ignore all lines of text and only import the data, specifically when the data is interupted through the file with words.

Thanks