Simulinkのソルバーの種類をmファイルで指定する方法
4 views (last 30 days)
Show older comments
Takuya Kinoshita
on 10 Dec 2022
Commented: Takuya Kinoshita
on 12 Dec 2022
mファイルからsimulinkを実行してシミュレーションを実施しているのですが,
その際にソルバーをmファイルから指定する方法はございますでしょうか。
0 Comments
Accepted Answer
Atsushi Ueno
on 11 Dec 2022
sim 関数の使用を想定しますが、ドキュメントに下記記載がありオプションでソルバーを指定する事が可能です。
% simOut = sim(modelName,"Solver","ode15s","StopTime","30")
% configures a simulation of the model specified by modelName to use the ode15s solver with a stop time of 30.
% は、ode15s ソルバーを使用してモデルをシミュレートし、SIimulationTime が 30 に達した時にタイムアウトが発生するように指定しています。
ドキュメントには詳細な説明が無いのですが、下記の説明をソルバーに当て嵌めると下記の様に言えます。
% ヒント:sim コマンドを使用して指定されるパラメーターは、
% [モデル コンフィギュレーション パラメーター] ダイアログ ボックスで定義されている値をオーバーライドします。
% 元の構成の値はシミュレーションの最後に復元されます。
More Answers (0)
See Also
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!