Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!news.belwue.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail
From: Lothar Schmidt <vapooroop@gmx.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: file length
Date: Wed, 03 Jun 2009 17:15:49 +0200
Organization: 1&1 Internet AG
Lines: 16
Message-ID: <h06437$kts$1@online.de>
References: <h05vlj$csf$1@fred.mathworks.com>
NNTP-Posting-Host: p5b1348a3.dip0.t-ipconnect.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: online.de 1244042151 21436 91.19.72.163 (3 Jun 2009 15:15:51 GMT)
X-Complaints-To: abuse@einsundeins.com
NNTP-Posting-Date: Wed, 3 Jun 2009 15:15:51 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
In-Reply-To: <h05vlj$csf$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:544539


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