[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to use textscan with gnu octave 3.6.2
From: |
Philip Nienhuis |
Subject: |
Re: how to use textscan with gnu octave 3.6.2 |
Date: |
Sun, 13 Jan 2013 11:37:00 -0800 (PST) |
brico wrote
> hi philip
>
> Thank you very much for your reply it has helped me a lot. i use fgetl
> because there are too many header lines (more than 50) and as you said
> the number of header lines vary between files.
> You can fine an example of the attached -file.
> test.txt <http://octave.1599824.n4.nabble.com/file/n4648825/test.txt>
> I wrote the code as you said
> "B = textscan(fid2, '%f = %s%f%f%f%f%f%s', 'delimiter', ';',
> 'headerlines', 1);"
> and i got the results i was expecting.
? Headerlines = 1 ?
In case of varying number of headerlines your while loop/fgetl code is a
good solution - at work we use similar constructs for some datafiles.
If you add another fgetl line after the while loop you could even eliminate
the headerlines parameter.
> Know i need this result to do a bilinear interpolation. The code i wrote
> is the following
> :
> <snip>
Sorry I have no time now, hopefully someone else will jump in.
> Thank you for your help.
You're welcome.
P.
--
View this message in context:
http://octave.1599824.n4.nabble.com/how-to-use-textscan-with-gnu-octave-3-6-2-tp4648766p4648833.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.