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

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

 Risposta accettata

MathWorks Support Team
MathWorks Support Team il 12 Dic 2011

0 voti

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)

Più risposte (0)

Categorie

Scopri di più su アプリの作成 in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!