Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!k13g2000hse.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: extract dynamically the headerlines row numvber by string/number 
Date: Mon, 30 Jun 2008 02:01:13 -0700 (PDT)
Organization: http://groups.google.com
Lines: 56
Message-ID: <f1b3ed88-2d4c-435f-b253-0a8a11201909@k13g2000hse.googlegroups.com>
References: <2924bec5-2274-4b3b-8354-20b34f59add2@m3g2000hsc.googlegroups.com> 
NNTP-Posting-Host: 212.17.141.53
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1214816474 14346 127.0.0.1 (30 Jun 2008 09:01:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 30 Jun 2008 09:01:14 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: k13g2000hse.googlegroups.com; posting-host=212.17.141.53; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
Bytes: 3409
Xref: news.mathworks.com comp.soft-sys.matlab:476569



On 30 Jun, 10:44, Engeltje <Engeltj...@gmail.com> wrote:
> On 29 Giu, 21:15, Rune Allnor <all...@tele.ntnu.no> wrote:
>
>
>
>
>
> > On 29 Jun, 20:27, Engeltje <Engeltj...@gmail.com> wrote:
>
> > > hi, everybody...I had a problem.
> > > I work with some namefile.tsv (a kind of txt files) that arecomposed
> > > by some headerlines, containg string values and number values in Date
> > > format and in the end of the file it contains some numerical colomns.
> > > I want
> > > either the row number of the begin of these numerical data, descarting
> > > the headerlines, end the row number of the end of the file
> > > or just the numbers contained in the end of the file disposed as a
> > > table.
>
> > > How can I obtain that dynamically? tha is create a function that do
> > > this work for different file with different numbers of headerlines?
>
> > If you know the format of the table you are looking for,
> > you can use a regular expression to search for it, and
> > discard the lines that don't match the pattern.
>
> > Rune
>
> Actually, if you mean with "format", what kind of type the colomns
> are, they're integer and float!
> But if you mean if they're of the same colomns number, the answer is
> no! these files are different!!

If you don't know what you are looking for and where to
find it, you are in serious trouble.

> But we have in the bottom of these files some colomns of number, and I
> don't know if matlab can see those as a table.

Matlab can't. You need to specify some properties that
separate those lines from the uninteresting stuff.
If you can do that, you can search for those prpoerties
using regular expressions.

> I'm very confused!
> and If I can search for it, How can I do that discarding the
> headerlines?

Use regular expressions.

> For instance in the first colomn the discarding lines are string
> values, while the interesting ones are integer value!

Use regular expressions.

Rune