Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to read text file row/column info
Date: Sat, 15 Mar 2008 12:32:08 +0000 (UTC)
Organization: Pierburg GmbH
Lines: 19
Message-ID: <frgfk8$itt$1@fred.mathworks.com>
References: <frfjcc$it5$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1205584328 19389 172.30.248.35 (15 Mar 2008 12:32:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 15 Mar 2008 12:32:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 872224
Xref: news.mathworks.com comp.soft-sys.matlab:457379



"Bruce Eddy" <sailboats@cfl.rr.com> wrote in message
<frfjcc$it5$1@fred.mathworks.com>...
> Hi,
> I am trying to read a large .txt file with 5 columns and 
> over 12000 rows of data.  I'm having trouble getting the 
> (row, column) numbers right.  
> [x]

Hi Bruce,

if you want to import numeric data only, (my) txt2mat from
the file exchange should do easily. Maybe 
A = txt2mat('c:\data\myfile.txt');
without any further options will work, if your file is quite
ordinarily structured. (You'll assign the columns of A to
your variables afterwards.)

So much about advertising. If it is mixed data (numbers and
strings), I recommend becoming acquainted to textscan, too.