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!