Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!59g2000hsb.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Extract just the header from a file
Date: Thu, 10 Jul 2008 00:35:20 -0700 (PDT)
Organization: http://groups.google.com
Lines: 16
Message-ID: <f6869f18-defe-48ad-a7c0-fef81db878d0@59g2000hsb.googlegroups.com>
References: <g53g1b$8dq$1@fred.mathworks.com>
NNTP-Posting-Host: 212.17.141.54
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1215675320 2232 127.0.0.1 (10 Jul 2008 07:35:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 10 Jul 2008 07:35:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 59g2000hsb.googlegroups.com; posting-host=212.17.141.54; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
Xref: news.mathworks.com comp.soft-sys.matlab:478545



On 10 Jul, 01:02, "Amir "
<amirschricker.DEL...@DELETE.gmail.DELETE.com> wrote:
> Hi. I have files that are composed of several dozen lines
> of text (the header) followed by several thousand lines of
> numbers (the data); all the files are formatted like this.

If this is a well-defined format, the header format will either
be known in advance (i.e. how many lines in the header), or the
size of a dynamic header will be sepcified in a known position
in the file.

You need to find out which it is, and then if necessary parse
the header for the size. Once you know how the size of the
header, use FGETL to read the lines.

Rune