Access simulink model's return values in App Designer

3 次查看(过去 30 天)
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
Use this when running the model:
simout = sim(model,'ReturnWorkspaceOutputs', 'on', 'SaveFormat', 'Structure');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop Apps Using App Designer 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by