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일
Use this when running the model:
simout = sim(model,'ReturnWorkspaceOutputs', 'on', 'SaveFormat', 'Structure');

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Modeling에 대해 자세히 알아보기

제품

릴리스

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