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

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

 Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 12 Dez. 2011

0 Stimmen

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

Weitere Antworten (0)

Kategorien

Mehr zu シミュレーション finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!