Access simulink model's return values in App Designer

I have a Simulink model that when run either from the Simulink model or the Command Window returns some variables to the workspace. However, this doesn't happen when I run the model from the App Designer. I would like to have access to these variables in the App.
Note: simout only returns the time array and I can't/don't want to modify the model in any way

 採用された回答

John F
John F 2022 年 3 月 10 日

0 投票

Use this when running the model:
simout = sim(model,'ReturnWorkspaceOutputs', 'on', 'SaveFormat', 'Structure');

その他の回答 (0 件)

カテゴリ

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

製品

リリース

R2020b

質問済み:

2022 年 3 月 10 日

回答済み:

2022 年 3 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by