Path: news.mathworks.com!not-for-mail
From: "AHMET ANIL DINDAR" <adindar@iku.edu.tr>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Delete single line using textscan
Date: Sat, 2 Aug 2008 07:45:03 +0000 (UTC)
Organization: Istanbul Kultur University
Lines: 33
Message-ID: <g7139v$8mp$1@fred.mathworks.com>
References: <g6vscv$91j$1@fred.mathworks.com> <g6vt5k$mi8$1@canopus.cc.umanitoba.ca> <g712in$mf2$1@fred.mathworks.com>
Reply-To: "AHMET ANIL DINDAR" <adindar@iku.edu.tr>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1217663103 8921 172.30.248.37 (2 Aug 2008 07:45:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 2 Aug 2008 07:45:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 389985
Xref: news.mathworks.com comp.soft-sys.matlab:483259



Correction to my code
say the file (ahmet.txt) includes the following lines 

ahmet an&#305;l dindar
10 20 30 40 
10 20 30 40 
10 20 30 40 
end

the script for deletion the alphabetic lines is 

%%%--------------------- START %%%%%%%%%%
fid=fopen('ahmet.txt') ; % the original file
fidd=fopen('new filename.dat','w') ; % the new file
while ~feof(fid) ; % reads the original till last line
  tline=fgets(fid) ;  % 
     if isletter(tline(1))==1 ;
     else
       fwrite(fidd,tline) ;
     end
end
fclose all ;
%%% -------------------END %%%%%%%%%%%%%%

the new file includes

10 20 30 40 
10 20 30 40 
10 20 30 40 

I tested it and it worked.

AAD