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

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

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 12 Déc 2011

0 votes

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

Plus de réponses (0)

Catégories

En savoir plus sur シミュレーション dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!