Path: news.mathworks.com!not-for-mail
From: "Steve " <steveDEL.bachmeierDEL@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: clear display
Date: Tue, 17 Jul 2007 14:51:34 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <f7il1m$t37$1@fred.mathworks.com>
Reply-To: "Steve " <steveDEL.bachmeierDEL@yahoo.com>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1184683894 29799 172.30.248.35 (17 Jul 2007 14:51:34 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 17 Jul 2007 14:51:34 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader vq ZN›á¢
Xref: news.mathworks.com comp.soft-sys.matlab:419525



I have a loop that takes about 10 minutes to run.  As this takes longer than expected, I would like a simple note displayed on the workspace showing the percentage.  I am successful doing:

for time=t';    %running time [hr]
    
    percent=round(time/size(t,1)*100);
    display(['Running... ',num2str(percent),'%'])

The problem is only that each loop displays the note, creating a long list on the workspace.  How can I clear the displayed line at the end of the loop and replace it with the newer one to show a single line with a changing percent done?

Thanks!