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.14@webcrossing.raydaftYaTP>
Date: Sat, 7 Jul 2007 18:06:02 -0400
References: <1183842074.669395.184660@c77g2000hse.googlegroups.com> <ef5cbda.10@webcrossing.raydaftYaTP> <1183843970.585935.265350@w3g2000hsg.googlegroups.com> <ef5cbda.12@webcrossing.raydaftYaTP> <1183845253.870162.4790@r34g2000hsd.googlegroups.com>
Lines: 19
NNTP-Posting-Host: 84.226.122.46
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:417794



muhdzubair:
<SNIP a simple conundrum...

> fid= fopen('foo.txt');
> n=textread(fid,'%n','headerlines',hdr);

well, for one: you don't need to open the file if you're using
<textread>...
just do

     type foo.txt
% and show the output

% then type
     n=textread('foo.txt',<...>)
% then report
     whos n

us