Path: news.mathworks.com!not-for-mail
From: "Vadim Teverovsky" <vteverov@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: problems using textread
Date: Tue, 18 Nov 2008 15:56:12 -0500
Organization: The MathWorks, Inc.
Lines: 44
Message-ID: <gfva5c$g5l$1@fred.mathworks.com>
References: <gfv9m2$968$1@fred.mathworks.com>
Reply-To: "Vadim Teverovsky" <vteverov@mathworks.com>
NNTP-Posting-Host: teverovskyv.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1227041772 16565 144.212.105.97 (18 Nov 2008 20:56:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 18 Nov 2008 20:56:12 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
Xref: news.mathworks.com comp.soft-sys.matlab:501568


Two suggestions:
1)  Use textscan instead of textread, it is the newer more full-featured 
function.
2) Please post your code, otherwise its difficult to help.  You likely need 
to skip some number of headerlines, and then should be able to read the
numeric data.
"Matthew " <men5mjr@leeds.ac.uk> wrote in message 
news:gfv9m2$968$1@fred.mathworks.com...
>i am trying to read in the 3rd value of the 1st numerical line 0.000 0.6149 
>0.00834 ........ of the file below using textread. however i am having a 
>lot of problems and it just will not read the line i want. it is the first 
>time i have used this type of text scanning read in method and it is 
>starting to annoy me. i want to read the value in exactly as is shown in 
>the file below then assign it to the variable Cd.
>
>
>       XFOIL         Version 6.94
>
> Calculated polar for: test airfoil
>
> 1 1 Reynolds number fixed          Mach number fixed
>
> xtrf =   0.500 (top)        0.500 (bottom)
> Mach =   0.100     Re =     1.000 e 6     Ncrit =   9.000
>
>  alpha     CL        CD       CDp       CM    Top_Xtr Bot_Xtr
> ------- -------- --------- --------- -------- ------- -------
>   0.000   0.6149   0.00834   0.00179  -0.1316  0.5000  0.1997
>   0.000   0.6149   0.00834   0.00179  -0.1316  0.5000  0.1997
>   0.000   0.6149   0.00834   0.00179  -0.1316  0.5000  0.1997
>   0.000   0.6149   0.00834   0.00179  -0.1316  0.5000  0.1997
>   0.000   0.6149   0.00834   0.00179  -0.1316  0.5000  0.1997
>   0.000   0.6149   0.00834   0.00179  -0.1316  0.5000  0.1997
>   0.000   0.6149   0.00834   0.00179  -0.1316  0.5000  0.1997
>   0.000   0.6149   0.00834   0.00179  -0.1316  0.5000  0.1997
>
>
>
> any help on this matter who be greatly appreciated as it does not seem to 
> matter how i construct my code i just cannot get it to work :(
>
>