MATLAB ファイルの進捗状況を表示する方法はありますか?

計算が完了するまでに時間がかかるプログラムがあります。計算の進み具合を確認するためにそれを表示する方法を教えてください。

 Accepted Answer

MathWorks Support Team
MathWorks Support Team on 12 Dec 2011

0 votes

WAITBAR 関数により、プログレスバーのように表示することができます。WAITBAR 関数は以下のサンプルのように使用します。
h = waitbar(0,'Please wait...');
s = clock;
for i = 1:50
%%%begin something process
pause(0.3)
%%%end process
%%%begin estimate remaining time
if i ==1
is = etime(clock,s);
esttime = is * 50;
end
h = waitbar(i/50,h,...
['remaining time =',num2str(esttime-etime(clock,s),'%4.1f'),'sec' ]);
%%%end estimate remaining time
end
close(gcf)

More Answers (0)

Categories

Find more on アプリの作成 in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!