Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Pull out specific numbers from unstructured text file
Date: Fri, 8 Feb 2013 19:51:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <kf3kvb$2sc$1@newscl01ah.mathworks.com>
References: <kf1bg4$d0u$1@newscl01ah.mathworks.com> <kf1dlk$cg0$1@speranza.aioe.org> <kf1pc7$684$1@speranza.aioe.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1360353068 2956 172.30.248.45 (8 Feb 2013 19:51:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 8 Feb 2013 19:51:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3536503
Xref: news.mathworks.com comp.soft-sys.matlab:788642

Ok, I get the idea. Here is what I tried:

fid=fopen(....,'rt');
l=' ';
while 1
   l=fgetl(fid);
   if strfind(l,' Nmoves')>0,break,end
end
Nmoves=sscanf(l,' Nmoves=%d');
Nrequired=fscanf(fid,' Nrequired=%d'); %up until here, no changes
l=fgetl(fid); %added this line
Tot_RL=sscanf(l,' TotRL= %f'); %added this line
fid=fclose(fid);

I am getting:
> Tot_RL =

           [ ]

Is something missing with the second fgetl() line?