How to save an output from Simulink into MatLab during different iteration ?

1 回表示 (過去 30 日間)
Ronan
Ronan 2024 年 7 月 25 日
コメント済み: Paul 2024 年 7 月 31 日
Hello,
I am running a CarMaker for Simulink simulation, where I have an output that I want to save. This Simulink .mdl is running multiple times with differents parameters automatically, and then during each new simulation, the new output overwrites the previous one into the MatLab workspace. How can I manage to save at each new simulation the ouput ?
Thank you in advance
PS: the output format is a timeseries, even though I'm not sur this really matters

採用された回答

Paul
Paul 2024 年 7 月 28 日
Hi Ronan,
Based on the description, there are probably several options, but hard to say specifically becasue we don't know exactly how the simulation is being excuted mutliple times and how the output is being logged. Regardless, the recommended approach is use the sim command using the Simulink.SimulationInput paradigm. Check the doc pages for more discussion of running multiple simulations for parameter sweeps. Also, this blog post may be of interest.
  2 件のコメント
Ronan
Ronan 2024 年 7 月 30 日
Hi Paul,
Thanks for the answer. The multiple simulations are realised with CarMaker on the following menu.
Each variation is running the simulation as if it was a manual run.
The ouptuts (T, T00, T01) are send into the WorkSpace with the simout block "To Workspace". My issue is that after each new executed variation, the values in the workspace are replaced, so at the end, I only have the outputs of the 5th variation.
Paul
Paul 2024 年 7 月 31 日
I don't know what CarMaker is. It appears to be a third party product. I'm surprised it doesn't have a way to deal with the issue you're facing.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by