Start matlab script (.m-File) after clicking run in Simulink CarMaker

5 ビュー (過去 30 日間)
mr.zengin
mr.zengin 2023 年 3 月 31 日
コメント済み: mr.zengin 2023 年 4 月 6 日
Hey guys,
i have a question. I have a simulink model of a CarMaker simulation and a matlab script to plot the received data from simulink.
My aim is to run the simulation via simulink and the matlab script shall be started automatically and plot the current data from simulink simultaneously. Is there any chance to realize it? I tried Callbacks but it didn't work the way i wanted it.
Thanks for your help!
Greetings,
mr.zengin

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2023 年 3 月 31 日
移動済み: Fangjun Jiang 2023 年 3 月 31 日
Clicking Run in Simulink or in CarMaker will start the simulation. What you need is to specify the "StopFcn" callback at the model properties. set it as the .m script that you want to run after the simulation stops.
  10 件のコメント
Fangjun Jiang
Fangjun Jiang 2023 年 4 月 6 日
If sigsOut is a data log in the config, inport and export, then no. That data log only happened after the simulation.
Beside the approach in above link, a more generic approach is to use "RuntimeObject"
mr.zengin
mr.zengin 2023 年 4 月 6 日
Hi,
thank you so much, we'll try it.
Greetings,
mr.zengin

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeManual Performance Optimization についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by