Path: news.mathworks.com!not-for-mail
From: "Dominic " <dcg48@cornell.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: file length
Date: Wed, 3 Jun 2009 15:50:17 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 18
Message-ID: <h0663p$4te$1@fred.mathworks.com>
References: <h05vlj$csf$1@fred.mathworks.com> <h06437$kts$1@online.de>
Reply-To: "Dominic " <dcg48@cornell.edu>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1244044217 5038 172.30.248.38 (3 Jun 2009 15:50:17 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 3 Jun 2009 15:50:17 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1482806
Xref: news.mathworks.com comp.soft-sys.matlab:544556


Lothar Schmidt <vapooroop@gmx.net> wrote in message <h06437$kts$1@online.de>...
> Dominic schrieb:
> > Hi, 
> > I was wondering if anyone knew of a way to find the length (preferably the number of rows) in a .dat file without having to load it into MATLAB?
> > Thank you
> 
> number of bytes you can find as follows:
> 
> fileinfo=dir('filename.dat');
> fileinfo.size
> 
> difficult to guess the number of row separators without reading the 
> file... perhaps meanwhile someone has written crystalball.m and put it 
> in the FEX.
> 
> Lothar

Is there any way for me to use the number of bytes in the file to deduce the number of data points or something along those lines?