Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!postnews.google.com!o61g2000hsh.googlegroups.com!not-for-mail
From:  muhdzubair@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to read a particular line
Date: Sat, 07 Jul 2007 22:17:14 -0000
Organization: http://groups.google.com
Lines: 48
Message-ID: <1183846634.857674.295830@o61g2000hsh.googlegroups.com>
References: <1183842074.669395.184660@c77g2000hse.googlegroups.com>
NNTP-Posting-Host: 80.6.89.170
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1183846635 7333 127.0.0.1 (7 Jul 2007 22:17:15 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 7 Jul 2007 22:17:15 +0000 (UTC)
In-Reply-To: <ef5cbda.14@webcrossing.raydaftYaTP>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 MPWBSRV
Complaints-To: groups-abuse@google.com
Injection-Info: o61g2000hsh.googlegroups.com; posting-host=80.6.89.170;
Xref: news.mathworks.com comp.soft-sys.matlab:417795



On Jul 7, 11:06 pm, us <u...@neurol.unizh.ch> wrote:
> 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

still i get errors...i thin u shud see the file and read it urself...
following is the file:



LATI     PEAK ALTITUDES IN KM       PEAK DENSITIES IN CM-3
GEOD   HMF2 h0.5 B0 HMF1 HME HMD  NMF2   NMF1   NVBot   NME

  52.0  341  281  79   0 105  88  154845   0    592   3090    400
  53.0  342  282  79   0 105  88  152400   0    592   3090    400
  54.0  343  283  80   0 105  88  150444   0    591   3090    400
  55.0  345  284  80   0 105  88  148955   0    591   3090    400
  56.0  346  285  81   0 105  88  147911   0    591   3090    400
  57.0  347  286  81   0 105  88  147293   0    590   3090    400
  58.0  348  286  81   0 105  88  147082   0    590   3090    400
  59.0  349  287  82   0 105  88  147258   0    590   3090    400
  60.0  350  288  82   0 105  88  147804   0    589   3090    400

---CCIR --B0Gul-------------------URSI ------------------------------
LAT/LON= 60.0/  1.1 H=0.0  RZ12=100.0 MMDD: 110  LT: 2.0  SZA=137.0
MLA/MLO= 61.8/ 91.3 DIP=72.2  F10.7=145.4  DDD:  10  UT: 1.9 SDE=-21.9
--------------------------------------------------------------------

i only want to read any particular column suppose 8th col of integers
and do not want to read the headers and the last four lines of text...
plz write down the cmds n proper format