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.6@webcrossing.raydaftYaTP>
Date: Sat, 7 Jul 2007 15:04:12 -0400
References: <1183826686.296756.96900@57g2000hsv.googlegroups.com> <ef5cbda.0@webcrossing.raydaftYaTP> <1183831715.608443.62780@n2g2000hse.googlegroups.com> <ef5cbda.2@webcrossing.raydaftYaTP> <1183832613.894876.43910@n60g2000hse.googlegroups.com>
Lines: 21
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:417768



muhdzubair:
<SNIP reading numbers from ascii file evergreen...

> At the moment there are 12 columns and 9 rows in the file...

one of the many solutions

% assume <foo.txt> is your ascii file

     fnam='foo.txt'; % your file
     nc=12; % your # of cols
     ec=8; % col to be extracted
     n=textread(fnam,'%n');
     n=reshape(n,nc,[]).';
     m=n(:,ec); % the 8th col
% the result
     type(fnam);
     n
     m

us