From: <HIDDEN>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to read a particular line
Message-ID: <ef5cbda.8@webcrossing.raydaftYaTP>
Date: Sat, 7 Jul 2007 15:21:51 -0400
References: <1183831715.608443.62780@n2g2000hse.googlegroups.com> <ef5cbda.2@webcrossing.raydaftYaTP> <1183832613.894876.43910@n60g2000hse.googlegroups.com> <ef5cbda.6@webcrossing.raydaftYaTP> <1183835610.503422.146760@22g2000hsm.googlegroups.com>
Lines: 20
NNTP-Posting-Host: 130.60.28.29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:417771



muhdzubair:
<SNIP everlasting oh-i-forgot-to-tell-you tedium...

> ur piece of code is giving error at 'textread...'
> as soon as i get strings in the file which are the headings f the
columns, i am unable to read the data...

well, why did you not say so earlier!? instead of wasting CSSM's
time...
as i said:
% assume <foo.txt> is YOUR ascii-file (assuming with the
% anatomy as posted in the OP...

now, if you have headerlines, use the additional option

     nhdr=2; % # of headers
     n=textread(fnam,'%n','headerlines',nhdr);
% rest of snippet

us