Keep Simulink Data Inspector plot settings between simulation runs

Hello
I am pretty sure that the contents of the graphs updated to new values after starting a new simulation. I must have changed something and now I always have to select each dataset for the plots again after tweaking some parameters of my simulation. This is very frustrating, as I need to plot many things to get a good picture of what is happening.
I tried to restore the preferences of the Simulation Data Inspector to no avail.

 採用された回答

Dennis Weber
Dennis Weber 2023 年 1 月 23 日

0 投票

The reason for this happening is a InitFcn Callback, which simulates a different model. If I remove that callback, it works as expected.
I did this because I am a newbie and wanted to have a nice but easy to make persistent GUI for the configuration of my large model. So I made a different model, which has all the info with nice radio buttons and everything and send that to the workspace by simulating it. I also wanted the big model to always have the most current settings in the workspace, so I simulated it in that callback. I am pretty sure there is a better way to do this, but that was the quickest for me.

その他の回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 1 月 23 日

0 投票

You should try to run this: Simulink.sdi.clearPreferences
to get back to the default settings of Simulink.

1 件のコメント

Dennis Weber
Dennis Weber 2023 年 1 月 23 日
This did not help unfortunately. I did try if it works with a different model and it does.
I compared between both models and found the reason. I will post it as an answer. It is a weird one.
Thank you for your help.

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

カテゴリ

ヘルプ センター および File ExchangeView and Analyze Simulation Results についてさらに検索

製品

リリース

R2022b

質問済み:

2023 年 1 月 23 日

回答済み:

2023 年 1 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by