Triggering Simulink simulation through GUI does not send data from simulink to workspace.

Triggering Simulink simulation through GUI does not send data from simulink to workspace.
I have a simulate button which i have configured to run a simulink file. However, if i run it through the GUI, the to-workspace blocks dont send data to the workspace. Hence I cannot generate plots based on that data. When i run the simulation through simulink ( by clicking the green play button as usual), data gets sent to the workspace as normal.
Need a solution for this as soon as possible.
command on button click
sim filename;

回答 (1 件)

Paul
Paul 2022 年 9 月 5 日

0 投票

Hi Amartya,
Does this answer help?

2 件のコメント

Amartya Banerjee
Amartya Banerjee 2022 年 9 月 5 日
Hi Paul, Thank you for the answer but i figured out another way. I tried the sim command many different ways but that didnt work. so i used the setparam for simulation command to 1... basically triggering the simulation through a parameter change. Worked in this particular situation, however I do not know why this problem would occur in the first place.
Amartya Banerjee
Amartya Banerjee 2022 年 9 月 5 日
got it from here. I'll put it out here for others like me or maybe me in the future and then I'd have a quiet laugh to myself about this... "classic MATLAB ! Am I right?"

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

カテゴリ

ヘルプ センター および File ExchangeSimulink Functions についてさらに検索

製品

リリース

R2021b

質問済み:

2022 年 9 月 5 日

コメント済み:

2022 年 9 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by