シミュレーションの進​捗状況を表示する方法​はありますか?

シミュレーションが完了するまでに数時間から数日かかるモデルがあります。シミュレーションの進み具合を表示する方法を教えてください。

 Accepted Answer

MathWorks Support Team
MathWorks Support Team on 12 Dec 2011

0 votes

モデルプロパティの InitFcn コールバックに以下のコマンドを設定します。
end_time=str2double(get_param(gcs,'stoptime'));
次に Clock ブロックなどの適切なソースブロックと Gain ブロックを接続します。Gain ブロックでは InitFcn で初期化された END_TIME 変数を参照し、進捗状況のパーセンテージを計算します。また、この値は embedded MATLAB Function ブロックを使用することにより MATLAB のコマンドウィンドウに表示することができます。
関連ドキュメントにあるサンプルモデルをご覧ください。

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!