Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!r66g2000hsg.googlegroups.com!not-for-mail
From: Engeltje <Engeltje81@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: extract dynamically the headerlines row numvber by string/number 
Date: Tue, 1 Jul 2008 01:40:15 -0700 (PDT)
Organization: http://groups.google.com
Lines: 60
Message-ID: <155421db-2dae-4c05-a69a-7bd91a8f6793@r66g2000hsg.googlegroups.com>
References: <2924bec5-2274-4b3b-8354-20b34f59add2@m3g2000hsc.googlegroups.com> 
NNTP-Posting-Host: 151.82.16.228
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1214901615 2655 127.0.0.1 (1 Jul 2008 08:40:15 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 1 Jul 2008 08:40:15 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r66g2000hsg.googlegroups.com; posting-host=151.82.16.228; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) 
Xref: news.mathworks.com comp.soft-sys.matlab:476806



On 30 Giu, 18:33, "Miroslav Balda" <balda.nos...@cdm.it.cas.cz> wrote:
> Engeltje <Engeltj...@gmail.com> wrote in message
>
> <2924bec5-2274-4b3b-8354-20b34f59a...@m3g2000hsc.googlegroups.com>...
>
> > 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?
>
> > please help me!!!
>
> > thx, angelo!
>
> Hi,
>
> Could you send a small example file with some notes what
> data you like to read.? I'll try to read it
>
> Mira

Hi Mira!!!
The problem I had I found a solution using the function
txt2mat(filename,0,1) I take the first colomn and then I made a
function that check if the result vector isnan (in this case increase
first index) else increase second index.
so thx to be interested!
Now I actually have a new problem!
I have some data in which part of the colomn is emtpy.
Example:

timestamp X Y value
10
20 3.2 3.4 4
30
40 1.2 2.7 10

I use:
values=textscan(filename,'%d %f %f %d', 4,'headerlines',1);

[TS,GazePointX,GazePointY,val]=values{:}

the problem is that it stops at TS=10, and the others are empty
Can u help me?
angelo