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

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

 採用された回答

MathWorks Support Team
MathWorks Support Team 2011 年 12 月 12 日

0 投票

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)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchangeアプリの作成 についてさらに検索

Community Treasure Hunt

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

Start Hunting!